Working on the 2Smart Cloud platform, we have developed several simple IoT devices for testing it. An ESP32-based Wi-Fi controller for addressable LED strips is one of these products. The device is controlled via a mobile application as well as other methods such as voice commands, a phone call, and a Telegram bot — these controls are available to all users. You can use our project and build a similar device at home. We’ve published the device’s schematic diagram, printed circuit board design, 3D model of the case, and firmware code. Besides this, we’ll show you how to assemble a Wi-Fi LED strip controller, as well as how to add your own effects to the firmware and register the controller as your own product on the platform.
All technical materials on creating a controller, including a printed circuit board project, can be found on the 2Smart Cloud GitHub. First, you need to use the Gerber project to order or make your own board.
To assemble the controller, you will need the following components:
ESP32 DevKit board | 1 pc. |
5×5 SMD clock button | 1 pc. |
micro USB connector | 1 pc. |
JST 3-PIN connector with a wire for connecting the LED strip | 1 pc. |
Let’s assemble the controller using these components:
After assembling the device, you just need to flash it and start using it for its intended purpose. There are two possible options at the flashing stage:
The first option is very simple – you only need to flash the device with a ready-made code and pair it to the mobile application. Firmware instructions are given in the readme file inside the repository.
As for the second option, it requires additional explanations.
To adapt the ready-made firmware code for yourself and add new controller effects, first of all, you need to create a new product in the 2Smart Cloud developer cabinet:
pio run -t uploadfs
pio run -t upload
We’re empower your business with our technology expertise
./2smart.sh erase_flash -d /dev/tty.SLAB_USBtoUART
./2smart.sh write -d /dev/tty.SLAB_USBtoUART
In both cases, the same controller is first used as a test device, and then as a finished product. We recommend having at least two controllers so that one of them always remains connected to the platform as a prototype.
The test device will allow you to work on new modes for the LED strip. Its firmware can be updated both via cable and over the air via the controller’s web interface (the firmware is installed on the Settings page). You can connect to the controller’s web interface using its local IP address, which is provided in the 2Smart Cloud mobile application.
After adding new modes or modifying the firmware for other purposes, you can upload the updated firmware file on the product page. All existing controllers will receive an update over the air. Read more about the mechanics of updating the firmware and delivering updates in this article.
We showed how to assemble a smart device using the available components. Ready-made firmware for the LED strip controller is available on GitHub, so you can use it unchanged on your devices. Also, you can take our code as a basis and modify the controller modes by adding new effects (more about how to add your effect for an LED strip controller).
Additionally, we prepared a second article regarding the same device. It details the process of developing ESPHome-based firmware. With it, you can create a compatible firmware for the controller using a simple tool that does not require the ability to program and use assembly programs on a computer.
The development of this idea is an IoT smart lighting solution where the controller described above controls the LED matrix, which is the basis for a smart lamp with multiple effects.
Share with us your business idea and expectations about custom software development for the internet of things.