Adafruit_Learning_System_Gu.../CircuitPython_Essentials/CircuitPython_AnalogOut.py
2020-12-16 14:46:09 -05:00

11 lines
303 B
Python

"""CircuitPython Analog Out example"""
import board
from analogio import AnalogOut
analog_out = 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):
analog_out.value = i