Adafruit_CircuitPython_DS3502/examples/ds3502_blinka_simpletest.py
2019-06-07 16:06:05 -07:00

21 lines
507 B
Python

from time import sleep
import board
import adafruit_ds3502
i2c = board.I2C()
ds3502 = adafruit_ds3502.DS3502(i2c)
# As this code runs, measure the voltage between ground and the RW (wiper) pin
# with a multimeter. You should see the voltage change with each print statement.
while True:
ds3502.wiper = 127
print("Wiper value set to 127")
sleep(5.0)
ds3502.wiper = 0
print("Wiper value set to 0")
sleep(5.0)
ds3502.wiper = 63
print("Wiper value set to 63")
sleep(5.0)