Flashing the ESP32-S3 DevKitC RGB LED #13177
smhodge42
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I presume most of us are like me that when faced with a new microcontroller, we like to use the LED equivalent of "hello world". The pyboard has built-in LED's and I always design one into any custom PCB design, programmed in either uPython or C++. Well, the built-in RBG LED on the new-to-me ESP32-S3-DevKitC-1 board stumped me, having never dealt with an addressable LED before. Plug a fresh-from-the-factory board into power and the RGB LED flashes, so I knew it must be possible. But that code vanished the instant I upgraded the firmware.
It took me a couple of days to figure out the uPython code to do it, largely because I could not find anything on the Internet -- or for that matter in Micropython Documents -- on exactly how to do this supposedly simple task (as a newbie to this board). It retrospect it is pretty simple after you realize/learn that the key is the "NeoPixel" class. I'm posting the code here so that it might save others the same trouble. The code endlessly flashes Red-Green-Blue, each color every second. Presumably the code will work on any ESP32-xx DevKit board with an addressable LED and a uPython port, such as the S2, C3 or C6 DevKits.
Beta Was this translation helpful? Give feedback.
All reactions