Create CircuitPlaygroundExpress_AnalogOut.py

Analog Out example
This commit is contained in:
John Edgar Park 2017-10-06 13:48:02 -07:00 committed by GitHub
parent 862891afb5
commit 16d5de07a9

View file

@ -0,0 +1,13 @@
# CircuitPlaygroundExpress_AnalogOut
from analogio import AnalogOut
import board
import time
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