forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
CircuitPython version
Adafruit CircuitPython 9.1.4
Adafruit CircuitPython 9.2.0-beta.1Code/REPL
# It was written for rp2040-zero and the code works perfectly.
# But this code doesn't work for esp32-c3 based boards.
import board, supervisor
import neopixel
pixels = neopixel.NeoPixel(board.GP16, 1, auto_write=True)
while True:
if supervisor.runtime.usb_connected:
pixels[0] = (0,255,0)
else:
pixels[0] = (255,0,0)Behavior
The LED should be green when the chip is connected via USB and red when the chip is connected to the power supply. In the case of rp2040-zero everything works perfectly, but esp32-c3 gives a false value all the time.
Description
No response
Additional information
No response