My code for ESP32 (espressif32) board. Which is used for controlling Classic LED strip and Addressable LED strip via mobile app over low energy bluetooth protocol (BLE).
For addressable LED strip and multiple color effects: FastLED, Documentation 1, Documentation 2
For Bluetooth communication: BLE, Documentation
Check out: Schematic
- 12V power supply (max power depends how many LEDs strips you would like to drive. For me 50W (4A)).
- Mini SMD step-down 12V => 5V for microcontroller.
- IoT ESP-WROOM-32 2.4GHz Dual-Mode CP2102 with 4MB Flash.
- level shifter (required only if Addressable LED strip is not getting strong enough data signal, depends on your Microcontroller)
- LEDs strips
- Software used for mobile app developement MIT App Inventor
- Mobile app released + Source.
- Install Visual Studio Code
- Install PlatformIO IDE extension (Depending on your Python version you can get error like this)
- Clone repository
- Open PlatformIO inside Visual Studio Code and click on Open Project and import cloned repository. 1. select PlatformIO (RED icon) 2. Import project (BLUE icon)
- Check if you have all required libraries
- Got to Definitions And add(generate) your own CHARACTERISTIC_UUIDs.
no_ota.csv => file that sets correct partition sizes, needed because BLE library is quite huge. More info.
platformio.ini => file that applies partition config and sets correct dev. board, lib dependencies and other settings. (It's something like simple MAKEFILE)