witnessmenow / ESP32-Cheap-Yellow-Display

Building a community around a cheap ESP32 Display with a touch screen
MIT License
1.26k stars 128 forks source link

Create LVGL_plus_LED.ino #179

Closed vaclavek-kamil closed 1 month ago

vaclavek-kamil commented 2 months ago

Hey,

I think this demo could be a cool little addition to the demos. It very simply demonstrates how to control hardware using an LVGL UI.

It features sliders which control the colors of the built-in CYD LEDs - creating essentially an RGB light. The sliders also change their color according to the color of the LED.

It can be run by anyone who can run the LVGL9 demo.

It can also be very simply appropriated to control an RGB LED strip connected to GPIO, for example.

I also made sure to do a lot of commenting, to perhaps explain some of the simpler programming contepts etc. - The code isn't optimal at all but I think it's worth it for the sake of simplicity.