analogout

This commit is contained in:
ladyada 2017-09-30 13:13:29 -04:00
parent a5880c1021
commit e3ee29a257

View file

@ -0,0 +1,13 @@
# Trinket IO demo - analog output
from analogio import AnalogOut
import board
import time
aout = AnalogOut(board.D1)
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