Codebra is a micropython web-editor/repl. I had rp2040s in mind but it should work for other boards.
Programs on the left will be uploaded as main.py
. On the right you can use the REPL.
To get started:
- download the uf2.
- plug in your xiao while holding down the boot button
- drop the
uf2
onto your board
- hit the
connect
button (the first time you will have to authorize the port) - start programming!
Here is an example program
from machine import Pin, Timer
led = Pin(25, Pin.OUT)
timer = Timer()
def blink(timer):
led.toggle()
timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink)