Wirelessly controlled LED Lights using Adafruit MacroPad and ESP32

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
KingKamal2400
 
Posts: 1
Joined: Thu Aug 18, 2022 4:25 pm

Wirelessly controlled LED Lights using Adafruit MacroPad and ESP32

Post by KingKamal2400 »

Hello! Fairly new to microcontrollers and IoT projects and wanted to make a post to see what kinds of options I have to complete this project and to get some guidance on what to consider. The goal is to be able to wirelessly control and change lighting settings of NeoPixel light strip(s) using the Adafruit MacroPad. I eventually want to also have the ability to automatically turn on said LED lights using some form of motion detection.

The current idea that I have is that the LED strip(s) and motion sensor will be connected to ESP32 modules which will receive/send data to a 'central server' which will be managing the lights and reading data from the sensor. Currently, the two options that I have thought of using are:
1) personal PC is said server and write a program (maybe in python?) that reads inputs from the macropad/sensor and sends the corresponding changes to the LED strip(s).
2) Arduino/Raspberry Pi houses the program and reads inputs from the macropad/sensor and sends the corresponding changes to the LED strip(s)

The main issues with option two is that I am unsure if an Arduino will be capable of this by itself and that the Raspberry Pi is a bit more expensive. I am curious what your guys' thoughts are with either option.

I'm currently wondering what other kinds of hardware/materials I will need to complete this project, what things I should consider, and if there are any issues with the current idea I had in mind. I am also not sure what kind of motion sensor I should consider.

Current shopping list:
MacroPad: https://www.adafruit.com/product/5128
ESP32 modules: https://www.adafruit.com/product/3619
LED Strips: https://www.adafruit.com/product/2842?length=2

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Wirelessly controlled LED Lights using Adafruit MacroPad and ESP32

Post by adafruit_support_mike »

A microcontroller can do the job you want, but there's a compatibility issue between the ESP32 and NeoPixels.

The ESP32 runs a built-in OS that swaps between your code and the firmware that keeps the radios happy. Most swaps to the radio firmware only last a few microseconds, but NeoPixels need bits to arrive every 1.25us.

An ESP32 can run a few NeoPixels without any problems, but trying to run long strips guarantees timing problems.

For what you want to do, DotStars would be a better choice than NeoPixels:

https://www.adafruit.com/category/886

DotStars use a CLOCK signal to tell when each bit arrives, so they aren't sensitive to the delays caused by the OS swapping back and forth.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”