Posts

Homemade HomeKit supported night light with ESP32

Image
Homemade?! Sounds like food, huh! What is the need? I purchased various night lights and was not happy with brightness, color selection and ease of control. In the US, power outlets are generally at bottom of the wall so the night light plugged in that outlet does not illuminate the room well. So I needed a night light which I can attach to the wall at height to better illuminate the room. ESP32 Devkit selection ESP32-S2 Saola devkits come with WS2812 LED. This is not a general LED that can be controlled with GPIO on-off. These LEDs can be chained in a strip and can be connected to a single GPIO to control the whole LED strip. On the board, there is only one LED and it's enough for my use as a night light. Software Development I have used Espressif Opensource HomeKit SDK and Espressif IDF SDK to develop the night light functionality. I have made the source code available under GPL 3.0 license on GitHub . Follow the steps in README on that repo to build and use the project at your

Debugging on ESP32 with OpenOCD and SEGGER J-Link

Image
ESP32 is one of the popular chipsets for Wi-Fi and BLE-based IoT development. ESP32 provides the facility to flash the board via the UART port. However, there is no on-chip debugger available to step debug your program on ESP32. Either you need to buy an ESP Debugger kit or you can use your existing Debugger like J-Link to debug your program. Debugging with J-Link is not explained on official Esperessif Docs. Most Embedded developers have J-Link already available, so it's obvious to use that one instead of purchasing an ESP debugger. In this post, I'll explain in detail how to use J-Link with ESP32 boards to debug your programs on Ubuntu 20.04 Linux OS. Please make sure that you have  not  installed Segger J-Link drivers as we are going to use OpenOCD here. Before we start the Software part, let's ensure proper hardware connection between J-Link and ESP32 board. I am using ESP32-S2-WROVER and J-Link Pro for my setup. ESP32-S2 and J-Link Pro connection ESP32-S2-WROVER Pin &a

Video Colorspace conversion with ffmpegcolorspace and similar Gstreamer Plugin

There are cases when we need colorspace conversion when decoding video with gst-launch tool of Gstreamer. We can use ffmpegcolorspace or videoconvert gstreamer plugin for the same. $ gst-launch-0.10 -v filesrc location=big_buck_bunny.mp4 ! qtdemux ! vmetadec ! 'video/x-raw-yuv,format=(fourcc)UYVY' ! ffmpegcolorspace ! 'video/x-raw-yuv,format=(fourcc)I420' ! autovideosink Above example gives you idea about how to tell ffmpegcolorspace plugin about from which format to convert and in what format to give output. 'video/x-raw-yuv,format=(fourcc)UYVY' ! ffmpegcolorspace ! 'video/x-raw-yuv,format=(fourcc)I420' So just remember above pipeline to convert from UYVY colorspace to I420 colorspace. You can change formats in above pipeline as per your need. In newer version of gstreamer, ffmpegcolorspace is replaced with videoconvert plugin. So above pipeline for newer version of gstreamer can be represented as below.  'video/x-raw-yuv,format=(fou

Take backup of your Android phone

Always you might be wondering that how to take backup of your phone if your Phone manufacturer does not provide you backup software. Also you may have seen option of "Backup password" in your Android phone. Do you wonder what's that ? Following is the way to backup your Android phone and it will answer all your above questions. 1). You need to have "adb" tool in your system. If you don't know what's this, then simply install Android SDK in your system by following procedure on developer.android.com. If you don't want to install whole SDK then just search for adb on google and just download single file for adb. 2). Once USB debugging is on, connect your phone to your PC. Go to the directory where "adb" is placed. Now on the command prompt or terminal write command "adb devices" (for Linux "./adb devices"). The output of the command should list your device with its serial number. If device is not listed then go here

Flashing Galaxy Nexus with Android 4.3

In this post I will let you know how to flash your Galaxy Nexus having device type "maguro" and yakju** build of Android OS, with latest Android 4.3 factory image provided by Google. ( Disclaimer: I have flashed my own phone in the following described way. However do the procedure at your own risk. Don't blame me if you brick your phone. ) 1). First of all check that your Galaxy Nexus has device type "maguro" and OS build name "yakju**". You can know this with Android app Android Info under section Software. You can download at  https://play.google.com/store/apps/details?id=Android.Info 2). Now you need to have "adb" and "fastboot" tool in your system. If you don't know what's this, then simply install Android SDK in your system by following procedure on  developer.android.com 3). Once you have installed "adb" and "fastboot", download the Android 4.3 factory image "yakju" for Galaxy Nexus