code.py
1 # SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 # CircuitPython IO demo - analog output 6 7 import board 8 from analogio import AnalogOut 9 10 analog_out = AnalogOut(board.A0) 11 12 while True: 13 # Count up from 0 to 65535, with 64 increment 14 # which ends up corresponding to the DAC's 10-bit range 15 for i in range(0, 65535, 64): 16 analog_out.value = i