Recommended High-Quality Open Source Projects for Arduino + ESP32

As a heavy user of ESP32 and an enthusiast who has been developing embedded applications using the Arduino framework, I have used many open source projects during the development of my previous projects. Here, I will summarize some interesting and useful open source project lists.

Some of these projects not only include firmware applications but also hardware designs, making them suitable as entry-level learning projects for electronic DIY.

Open Source Project Collection

awesome-esp

Project address: https://github.com/agucova/awesome-esp

A collection of ESP32/ESP8266 open source projects compiled by an overseas enthusiast, mainly focusing on complete firmware applications.

Firmware Applications

Here are some complete open source firmware projects that usually also include a complete hardware project, making them great examples for learning hardware development or embedded software development.

ESPHome

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/esphome/esphome

One of the most popular open source smart home firmware, it allows for the quick integration of various sensors, switches, screens, and other devices into a single firmware through YAML configuration files. It also supports smart home platforms like Home Assistant, allowing for one-click addition to these platforms.

To use ESPHome, you only need to have a basic understanding of GPIO knowledge and the concepts of I2C and SPI buses. The drivers for sensors or other peripherals are already included in the firmware, and the official documentation also contains detailed configuration tutorials.

Previously, I quickly set up two applications using ESPHome:

  • Super Simple DIY – AirCube Air Quality Detection Station

    • https://xujiwei.com/blog/2022/12/aircube-diy-environment-monitor-station/

  • Built a simple power meter using ESPHome + INA219 module

    • https://xujiwei.com/blog/2022/10/build-power-meter-with-esphome-and-ina219/

X-Knob

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/SmallPond/X-Knob

An open source brushless motor knob firmware based on smartknob and X-Track. Compared to the original custom drawing interface, X-Knob uses LVGL to render the interface, making it much more extensible and convenient for development. The author has also set up a UI lifecycle management system, making page management more comfortable.

WLED

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/Aircoookie/WLED

Open source WS2812B LED strip control firmware, comes with an app and web control interface that provides various lighting effects, such as running lights and rainbow lights. The firmware also provides an API to control the LED strip, theoretically allowing you to buy a cheap WS2812B LED strip from Taobao and use it with a NodeMCU/ESP8266 development board instead of those expensive YeeLight strips.

AWTRIX

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/awtrix/AWTRIX2.0-Controller

A popular pixel clock that includes various applications such as weather forecasts, air quality, time, date, and follower counts on various platforms. I replicated two versions, one directly using a 32×8 WS2812 pixel screen purchased from Taobao with 5050 package lamps, which is relatively large, and the other is a smaller version that I designed myself using 3528 package lamps.

The server functionality that comes with AWTRIX is quite powerful; it not only allows for application installation but also supports icon drawing and has an API for pushing notifications, making it possible to use AWTRIX pixel clocks as a notification center.

This project uses ESP8266 and is currently no longer maintained. The author has opened a new project using ESP32, but the functionality and ecosystem are not as strong as the old version. The main advantage is that it can run standalone without needing to deploy a separate server, but if you want to expand more features, you still need server programs like Home Assistant or NodeRED.

AWTRIX Light: https://github.com/Blueforcer/awtrix-light

HoloCubie_AIO

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/ClimbSnail/HoloCubic_AIO

A transparent small TV launched by Zhihui Jun a long time ago, it serves as a nice desktop ornament. This project is an independent firmware launched by a third party based on the original hardware, containing more features than the original version, and has a PC program to control the small TV.

mongoose-os

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/cesanta/mongoose-os

A firmware designed for IoT devices, integrating many commonly used features such as OTA firmware updates and remote management. It also supports many large platform IoT capabilities, such as AWS IoT, Google IoT Core, and Microsoft Azure.

Another notable feature of this firmware is that it allows business logic to be written in JavaScript. For engineers familiar with JavaScript, they can completely ignore how the firmware is compiled and packaged, focusing solely on writing business logic.

open-ip-kvm

Recommended High-Quality Open Source Projects for Arduino + ESP32

Project address: https://github.com/Nihiue/open-ip-kvm

An open source IP-KVM, similar to Pi-KVM, but with a much lower cost. This open source project uses an Arduino Leonardo development board to simulate HID devices and uses an MS2109 capture card to capture the HDMI output of the target device, ultimately providing an operational interface to the user using nodejs + Web.

The entire project is relatively complete, and compared to Pi-KVM, the overall setup cost can be an order of magnitude lower.

Basic Libraries

ArduinoJson

Project address: https://github.com/bblanchon/ArduinoJson

For applications with network requests, JSON parsing and generation are essential, as most APIs use JSON as the request and response format for HTTP APIs.

ArduinoJson supports both static and dynamic memory allocation. On ESP32, you generally do not have to worry about memory usage, and the parsing speed is quite good. When using static parsing, it is important to ensure that objects are within the valid reference range; otherwise, data corruption may occur.

Nanopb

Project address: https://github.com/nanopb/nanopb

Protobuf is also a commonly used communication format in some long connection scenarios due to its small size, fast parsing speed, and good forward compatibility, making its application range quite broad. In embedded applications, there may be scenarios where Protobuf needs to be parsed, and Nanopb can be used for this purpose.

Arduino-SHA-1-Hash

Project address: https://github.com/mr-glt/Arduino-SHA-1-Hash

A SHA-1 Hash generation library that I found to be quite useful after comparing several libraries, typically used for generating signatures for API requests.

arduino-crypto

Project address: https://github.com/intrbiz/arduino-crypto

A tested AES encryption and decryption and SHA256-HMAC generation library that can be used in scenarios requiring HMAC.

Development Assistance

EspArduinoExceptionDecoder

Project address: https://github.com/janLo/EspArduinoExceptionDecoder

For ESP32 applications, when a crash occurs, you usually only get a core dump containing various code addresses. This tool can be used to convert those hexadecimal code addresses into actual source code locations by combining it with the locally compiled firmware image, making it easier to troubleshoot how the exception occurred.

Peripheral Drivers

ClickEncoder

Project address: https://github.com/soligen2010/encoder

Rotary encoder driver that supports click, double-click, long press, and other event detection, based on timers, with good applicability.

Adafruit_GPS

Project address: https://github.com/adafruit/Adafruit_GPS

GPS protocol parsing library that supports NMEA-0183 and compiles smoothly on ESP32. Other libraries may have various issues.

However, it is important to note that this library does not support all NMEA commands, so actual data should be checked for expected results.

INA219_WE

Project address: https://github.com/wollewald/INA219_WE

Current/power meter INA219 chip driver library, with clean code and support for setting the sampling resistor size, allowing for an increased current sampling range by reducing sampling precision.

MT6701-Arduino-Library

Project address: https://github.com/S-LABc/MT6701-Arduino-Library

MT6701 magnetic encoder driver library, which can serve as a replacement for TLV493D in the smartknob project.

OneButton

Project address: https://github.com/mathertel/OneButton

A button detection library supporting various trigger methods and detecting events such as single click, double click, and long press.

IRremoteESP8266

Project address: https://github.com/crankyoldgit/IRremoteESP8266

Infrared remote control protocol library that can be used to develop universal remote hardware, supporting many devices, including some domestic appliances, such as Midea air conditioners, allowing precise control of temperature, wind speed, etc., rather than just replaying infrared commands obtained from the remote control.

Network Communication

ESPxWebFIMgr

Project address: https://github.com/holgerlembke/ESPxWebFlMgr

A library that allows for managing files in the built-in SPIFFS of ESP32/ESP8266 via web pages, enabling download, deletion, renaming, and displaying available space in SPIFFS.

With this library, the simplest file management functionality can be achieved, such as synchronizing data recorded in SPI Flash to a computer.

ESPAsync_WiFiManager

Project address: https://github.com/khoih-prog/ESPAsync_WiFiManager

The most commonly used library for configuring ESP32 Wi-Fi connections via the web. When not connected to Wi-Fi, it starts a hotspot, allowing users to connect and set the Wi-Fi access point name, password, etc., and integrates known SSID scanning capabilities.

However, one downside of this library is that, in the default implementation, even if previously connected networks are saved, it still scans for known networks and matches them with previously connected BSSIDs, resulting in slower connection speeds at startup. You can bypass this process by directly calling the ESP32 official library’s WiFi.begin method for faster connection speeds.

NTPClient

Project address: https://github.com/arduino-libraries/NTPClient

For ESP32 series, if you don’t want to add an RTC chip to keep track of time, using NTP to get time is a good choice, and this library can be used to synchronize NTP time and obtain the current time, which is also quite simple to use.

arduinoWebSockets

Project address: https://github.com/Links2004/arduinoWebSockets

This library can be used when connecting to a WebSocket server and is considered to be one of the more useful ones compared to several others.

ArduinoHttpClient

Project address: https://github.com/arduino-libraries/ArduinoHttpClient

Compared to the built-in HTTPClient, this library supports more methods for sending HTTP requests, has better encapsulation, and supports setting headers and Basic Auth.

EspSoftwareSerial

Project address: https://github.com/plerup/espsoftwareserial

ESP32 only has 2 available UARTs, and if you want to connect more UART peripherals, you can use this software-simulated UART library, which is quite commonly used.

OTA

esp32-http-update

Project address: https://github.com/suculent/esp32-http-update

ESP32 Arduino has built-in OTA support but only supports HTTPS addresses and not HTTP URLs. Using HTTPS addresses requires configuring a bunch of certificates and website signatures, which can be cumbersome. This library supports firmware updates directly via HTTP URLs, with firmware integrity verifiable through other HTTPS APIs that can provide MD5 and other signatures.

Graphics and Images

GxEPD2

Project address: https://github.com/ZinggJM/GxEPD2

A driver library for SPI interface electronic ink screens, supporting many sizes of SPI interface electronic ink screens and is relatively easy to use.

ArduinoMenu

Project address: https://github.com/neu-rah/ArduinoMenu

This library generates multi-level menus through configuration, supports menu items for settings, and supports completion of settings via encoders, allowing for multiple outputs, which is convenient for debugging, such as outputting menus simultaneously on 0.96 OLED and Serial.

TFT_eSPI

Project address: https://github.com/Bodmer/TFT_eSPI

A TFT LCD driver library supporting common controllers like ST7789V and GC9A01.

lvgl

Project address: https://github.com/lvgl/lvgl

A cross-platform GUI framework that includes many controls such as tabs, input boxes, dropdowns, etc., and includes soft keyboards, and can integrate multiple input devices such as mice, keyboards, and encoders to implement a complete embedded device interface program.

Conclusion

Arduino is still a relatively convenient development framework, and combined with the powerful performance of ESP32 and its built-in networking features, it is quite easy to develop networked device applications. I hope these open source projects will help everyone enter the world of electronic DIY.

Click to read the original article with links

Leave a Comment