Chromawand; sends MPU6050 data to WLED controller

Good Morning,

Struggling to figure out a way to keep motion detection active using an interrupt, for sequential data readings; decide on another approach. Using a touch pin with a conditional statement. I have the desired result working.

If the “Chromawand” is in use the motion function is called; when not in use, noMotion function is called. Nearly perfect; except for some math processing time I think, as there is some lag between “Chromawand” movement andd seeing the change in RGB effects.

“Chromawand” uses MPU6050, Accelerometer and Gyroscope to send motion data; after conversion to WLED variables. Variables make up a custom URL String; sent by HTTPClient to a WLED Controller. I am sending ny WiFi; from Sketch running on an ESP32. Sketch will also run on an ESP8266.

Project should work with any WLED Controller; since it utilizes the WLED HTTP api. There is no need for a Usermod. Project was developed with an assist from OpenAI’s. ChatGPT.

Code is on GitHub Updated 04/10/2023

Latest version 04/10/2023; “MPU6050_WLED_withFive_Switches.ino” no longer uses touch features; instead, it uses five switches for better user interface. Additionally, a potentiometer is used to adjust delay between sending of URL to WLED Controller. Features are nearly the same. Find the latest version in the folder: MPU6050_WLED_withFive_Switches. Note: must use the new variables.h file; as variable names have changed. First time use; edit variable values to match your network and your configuration. Find neteork configuration in network.h.



Very interesting project !
Do you think it would work within the WLED ESP32, directly connected to WLED without wifi ?
would be for animation of an illuminated swing.


I am not sure what you mean by directly connected. No Internet is required.

Project uses HTTP Client to send data via WiFi. Can you explain what it is you wanting to do in more detail?

Thanks for your interest in project.