Thoughts on how to proceed with interfacing APDS9960 Gesture Module. Device is I²C.
Is there a non-compiled version of WLED/WLED SR for the ESP32? Current controller is an Athom WLED Music RGB Strip Controller. I also have ESP32, Node32s development boards available.
I have Python code that interfaces Athom controller using the HTTP Api; would like to use Gestures to to set variables in the Python code. Currently variables are FX and FP and time.sleep(seconds).
Regards,
William
Hi.
I’m sorry for taking so long to get back to you.
Unfortunately, I never experimented with that module. Have you taken a look at the adafruit library? Usually, their libraries are compatible with the ESP32 and you only need to adjust the I2C pins in the code.
https://github.com/adafruit/Adafruit_APDS9960/blob/master/examples/gesture_sensor/gesture_sensor.ino
Regards,
Sara
Hi Sara,
My apologies for the delayed response.
My finding on the APDS9960 Gesture sensore; not suited for the application of creating 0-255 values needed for WLED URL variables. Thinking of using a “paddle” with the MPU6050 mounted, then a person could “wave” the “paddle” generating RGB values in the range 0-255. I have coded a sketch to try “different” methods of declaring the red, green, and blue variables. Sketch collects 40 passed of gathering data; then FTP becomes available for reading the data collected.
Testing_MPU6050.ino
Declarations of red, green, and blue:
/* Get new sensor events with the readings */
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
int red = map((a.acceleration.x), -32768, 32767, 0, 255);
int green = map((a.acceleration.y), -32768, 32767, 0, 255);
int blue = map((a.acceleration.z), -32768, 32767, 0, 255);
Need to experiment to get the most 0-255 values I can “pull” out of the RGB declarations. Any suggestions; I am seeing limited range and not the full 0-255 range. I would like to elimanate any negative values.
Regards,
William
Good Evening,
Created a sketch that creates variables: “effects,” “intensity,” and “color pallete” for use with WLED. More details about the WLED can be found at: WLED Project
Here are the results of MPU6050 Accelerometer and Gyro Breakout project:
MPU6050_WLED project can be found at: WLED Project
Short video of WLED receiving commands from Python linked in this topic: WLED Strip LED light effects
Best of all WLED is a compiled binary, it can be installed to ESP32 from a Web base installer or you can compile a customized version.
Regards,
William
Thanks for the update.
Looking forward to seeing the final project.
Regards,
Sara
Good Evening,
Short video; waving “paddle” with ESP32 and MPU6050 Accelrometer/Gyroscope, effecting changes to RGB Leds being controlled by a Athom ESP32 Music controller for addressable RGB Leds. Athom device is running WLED Sound Reactive firmware; which has WiFi and responds to a “custom” URL sent from the ESP32 on the “paddle.”.
There is a lag between paddle movement and seeing a change in effect, intensity, and color. Maybe due to math processes running before the URL is sent.
MPU6050_WLED Github Repository
Regards,
William
Good Morning Sara,
Thank you; your feedback is apreciated.
“MPU6050_WLED.ino” sketch sends a “custom” URL from 2nd ESP32 to the controller; which runs the WLED Sound Reactive firmware. Parameters FX (effects), intensity (IX), and colors (FP) are “generated” by motion of the MPU6050; if there is no MPU6050 motion, FX, and FP are “generated” randomly. Sketch uses interrupt on the MPU6050; to know when motion is detected.
Regards,
William
Good Morning,
Struggling to figure out a way to keep motion detection active, 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.
William
Video of MPU6050_WLED running on Tom Parish’s ORB art project: Video shows Tom using the Chromawand (pcb with ESP32 and MPU6050 Accellrometer/Gryou) for sending “custom” URL’s for controlling effects. intensity, and color pallette to a WLED controller for RGB Addressable RGB Leds.
William
Thanks for the feedback Sara.
Have created another version; this one uses four switches and does not use touch sensors. Sketch can be found on Githb: New version of MPU6050_WLED project
ChatGPT assisted in creating this project.
OpenAI’s ChatGPT Sign-in or Sign- up web page
Regards.
William