Adafruit_Learning_System_Gu.../CircuitPython_Quick_Starts/CircuitPython_AnalogOut.py
2018-03-07 12:24:30 -05:00

12 lines
293 B
Python

# CircuitPython IO demo - analog output
from analogio import AnalogOut
import board
aout = AnalogOut(board.A0)
while True:
# Count up from 0 to 65535, with 64 increment
# which ends up corresponding to the DAC's 10-bit range
for i in range(0, 65535, 64):
aout.value = i