d3bb3e38df
A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
16 lines
247 B
Python
16 lines
247 B
Python
import pyb
|
|
|
|
if not hasattr(pyb, 'DAC'):
|
|
print('SKIP')
|
|
import sys
|
|
sys.exit()
|
|
|
|
dac = pyb.DAC(1)
|
|
print(dac)
|
|
dac.noise(100)
|
|
dac.triangle(100)
|
|
dac.write(0)
|
|
dac.write_timed(bytearray(10), 100, mode=pyb.DAC.NORMAL)
|
|
pyb.delay(20)
|
|
dac.write(0)
|