File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ To output a continuous sine-wave::
2626 # create a buffer containing a sine-wave
2727 buf = bytearray(100)
2828 for i in range(len(buf)):
29- buf[i] = 128 + int(127 \ * math.sin(2 \ * math.pi \ * i / len(buf)))
29+ buf[i] = 128 + int(127 * math.sin(2 * math.pi * i / len(buf)))
3030
3131 # output the sine-wave at 400Hz
3232 dac = DAC(1)
33- dac.write_timed(buf, 400 \ * len(buf), mode=DAC.CIRCULAR)
33+ dac.write_timed(buf, 400 * len(buf), mode=DAC.CIRCULAR)
3434
3535To output a continuous sine-wave at 12-bit resolution::
3636
@@ -43,7 +43,7 @@ To output a continuous sine-wave at 12-bit resolution::
4343
4444 # output the sine-wave at 400Hz
4545 dac = DAC(1, bits=12)
46- dac.write_timed(buf, 400 \ * len(buf), mode=DAC.CIRCULAR)
46+ dac.write_timed(buf, 400 * len(buf), mode=DAC.CIRCULAR)
4747
4848Constructors
4949------------
You can’t perform that action at this time.
0 commit comments