In [1]:
# Setup Code
import sys!!
sys.path.append('/Users/User/dev/micropython/tools')!!
import pyboard!!
pyb = pyboard.Pyboard('/dev/tty.usbmodem1422')!!
In [2]:
pyb.enter_raw_repl()!!
In [ ]:
pyb.exit_raw_repl()!!
In [9]:
# Blink an LED
import pyb
for x in range(10):
pyb.LED(1).toggle()
pyb.delay(500)
Out[9]:
In [23]:
print("hello world")
Out[23]:
In [16]:
# TIM Example
tim = pyb.Timer(1, freq=1000)
tim.counter()
tim.freq(0.5)
tim.callback(lambda t: pyb.LED(1).toggle())
Out[16]: