From e92565bde64b019276a537d1229c97d7175e6294 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Wed, 6 Nov 2024 12:19:00 +0530 Subject: [PATCH] Removed cleanup from beginning of the code. --- Practical/Assignment-3/IoT - Code-3.py | 1 - Practical/Assignment-4/IoT - Code-4.py | 1 - Practical/Water-level.py | 1 - 3 files changed, 3 deletions(-) diff --git a/Practical/Assignment-3/IoT - Code-3.py b/Practical/Assignment-3/IoT - Code-3.py index 1404495..e14855f 100644 --- a/Practical/Assignment-3/IoT - Code-3.py +++ b/Practical/Assignment-3/IoT - Code-3.py @@ -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 diff --git a/Practical/Assignment-4/IoT - Code-4.py b/Practical/Assignment-4/IoT - Code-4.py index 274c570..7b2fd5f 100644 --- a/Practical/Assignment-4/IoT - Code-4.py +++ b/Practical/Assignment-4/IoT - Code-4.py @@ -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: diff --git a/Practical/Water-level.py b/Practical/Water-level.py index f631ef1..c635886 100644 --- a/Practical/Water-level.py +++ b/Practical/Water-level.py @@ -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