I wanted to generate a triangle at 60 Hz on my original Pyboard 1.1 (firmware v1.11-126... on 2019-07-05)
After documentation read, I did wrote this small snip of code:
Code: Select all
>>> import pyb >>> dac = pyb.DAC(1, bits=12) >>> triangle_freq = 60 >>> sample_freq = triangle_freq * 2048 >>> dac.triangle( sample_freq )
As result, I have a Triangle @ 14.79 Hz (4 times less than expected 60 Hz triangle ).
Did I miss something obvious?