Skip to content

Commit be92228

Browse files
authored
Create potentiometer-print.py
1 parent da45482 commit be92228

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import time
2+
import board
3+
from analogio import AnalogIn
4+
5+
potentiometer = AnalogIn(board.A1) # potentiometer connected to A1, power & ground
6+
7+
while True:
8+
9+
print((potentiometer.value,)) # Display value
10+
11+
time.sleep(0.25) # Wait a bit before checking all again

0 commit comments

Comments
 (0)