Commit cda363a0 authored by Damien George's avatar Damien George
Browse files

tests, pyb: Add 'import pyb' when needed.

parent c327c0de
import pyb
accel = pyb.Accel()
print(accel)
accel.x()
......
import pyb
dac = pyb.DAC(1)
print(dac)
dac.noise(100)
......
import pyb
ext = pyb.ExtInt('X1', pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l:print('line:', l))
ext.disable()
ext.enable()
......
import pyb
from pyb import I2C
i2c = I2C(1)
......
import pyb
from pyb import LED
for i in range(4):
......
import pyb
from pyb import RTC
rtc = RTC()
print(rtc)
rtc.datetime((2014, 1, 1, 1, 0, 0, 0, 0))
......
from pyb import Switch
sw = pyb.Switch()
sw = Switch()
print(sw())
sw.callback(print)
sw.callback(None)
import pyb
from pyb import Timer
tim = Timer(4)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment