RGB LED on ESP32S3 board #9661
-
I am using an ESP32-S3-DevKitM-1, which has an RGB LED. I try to turn on this LED with the following: from machine import Pin
led = Pin(48, Pin.OUT, drive=Pin.DRIVE_2)
led.on()
print(led.value()) The LED does not light, but the printed value is 1. Since it is an RGB LED, I would have thought 3 GPIOs would be needed, but the document just says it is driven by GPIO48. The silkscreen on the board also says 'RGB@IO48' next to the LED. Any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
It's a digital addressable LED. |
Beta Was this translation helpful? Give feedback.
-
Nothing wrong with the code. It works just fine for me on the same module. I'm running the latest stable version of micropython using picocom to access the REPL. Unusually on this module you can run both via USB0 or ACM0 and both work just fine to turn on the LED. What are you using to run the software? Is micropython up to date? |
Beta Was this translation helpful? Give feedback.
-
That all looks good but doesn't explain why the code doesn't work for you. I did wonder if your initial attempt had killed the rgb led. Settings GPIO 48 as you did initially does block any subsequent attempt to use the neopixel module but only for that session. It's back to working after a reboot. You also don't need the Pin.OUT in your pin assignment for the neopixel but it still works. I have to agree with Lobo-t that it looks like you have a dead LED... |
Beta Was this translation helpful? Give feedback.
-
Working Script:
|
Beta Was this translation helpful? Give feedback.
-
Maybe someone is interested. I had the same problem with a N16R8 board V1.3 (with USB-C ports) where I couldn't control the LED. On a board Rev. V1.1(Micro-USB ports) it worked. |
Beta Was this translation helpful? Give feedback.
Working Script: