Create CircuitPlaygroundExpress_AnalogOut.py
Analog Out example
This commit is contained in:
parent
862891afb5
commit
16d5de07a9
1 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
Loading…
Reference in a new issue