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