Removed cleanup from beginning of the code.
This commit is contained in:
parent
2273a5f463
commit
e92565bde6
@ -12,7 +12,6 @@ import time
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setwarnings(False)
|
||||
GPIO.cleanup()
|
||||
GPIO.setup(16,GPIO.IN) # For IR sensor
|
||||
GPIO.setup(26,GPIO.OUT) # For LED
|
||||
|
||||
|
@ -23,7 +23,6 @@ import time
|
||||
# initialize GPIO
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setwarnings(False) # Set True if you are having trouble connecting the DHT11 sensor to Raspberry Pi. Doing so will show warnings on screen.
|
||||
GPIO.cleanup()
|
||||
|
||||
try:
|
||||
while True:
|
||||
|
@ -12,7 +12,6 @@ import RPi.GPIO as GPIO # Import library
|
||||
# Initalize GPIO
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setwarnings(False)
|
||||
GPIO.cleanup()
|
||||
GPIO.setup(16, GPIO.IN) # Set GPIO 16 as input for water level sensor signal
|
||||
GPIO.setup(26, GPIO.OUT) # Set GPIO 6 as output for LED
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user