Posts

Showing posts from 2021

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