blob: c39390535d9a10658fabf29a9e567ab211677835 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/python3
import time
import RPi.GPIO as GPIO
moisture_pin = 21
GPIO.setmode(GPIO.BCM)
GPIO.setup(moisture_pin, GPIO.IN)
while True:
print(GPIO.input(moisture_pin))
time.sleep(1)
|