M_L
August 4, 2022, 12:56pm
1
Hi,
I flashed CircuitPython 7.3 and 8 on my Xiao and tried to use the BLINK example:
import time
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
while True:
led.value = True
time.sleep(1)
led.value = False
time.sleep(1)
The problem is, that CiPy complains that D13 is not defined. D1 to D10 work, but nothing beyond. How do I get the LED to flash?
In CircuitPython:
The name for the Yellow LED is LED_INVERTED (opposite on/off sense from other CircuitPython) boards. I believe D13 is not used because it is not directly exposed pin. The LED names in CircuitPython are:
LED_INVERTED PortA_17
YELLOW_LED_INVERTED PortA_17
RX_LED_INVERTED PortA_18
BLUE_LED1_INVERTED PortA_18
TX_LED_INVERTED PortA_19
BLUE_LED2_INVERTED PortA_19
See circuitpython git hub: ports/atmel-samd/boards/seeeduino_xiao/pins.c
1 Like
M_L
August 8, 2022, 5:20pm
3
Thank you so much! That really helped. It’s weird that the standard example that is posted everywhere doesn’t work, though