Added handout for assignment 5 and added link in README.
This commit is contained in:
parent
fa047dee95
commit
819932c459
BIN
Practical/Assignment-5/IoT - Handout-5.pdf
Normal file
BIN
Practical/Assignment-5/IoT - Handout-5.pdf
Normal file
Binary file not shown.
26
Practical/Assignment-6/Water level code.py
Normal file
26
Practical/Assignment-6/Water level code.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
"""
|
||||||
|
THIS CODE HAS BEEN TESTED ON RASPBERRY PI 3B, 4B AND IS FULLY OPERATIONAL.
|
||||||
|
|
||||||
|
Problem Statement: Water level
|
||||||
|
|
||||||
|
Code from InternetOfThingsAndEmbeddedSystems (SPPU - Third Year - Computer Engineering - Content) repository on KSKA Git: https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems
|
||||||
|
"""
|
||||||
|
|
||||||
|
# BEGINNING OF CODE
|
||||||
|
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(6, GPIO.OUT) # Set GPIO 6 as output for LED
|
||||||
|
|
||||||
|
while True:
|
||||||
|
if (GPIO.input(16))
|
||||||
|
GPIO.output(6, True) # Turn ON LED if water detected
|
||||||
|
else
|
||||||
|
GPIO.output(6, False) # Keep LED OFF if no water detected
|
||||||
|
|
||||||
|
GPIO.cleanup()
|
||||||
|
# END OF CODE
|
@ -18,6 +18,7 @@
|
|||||||
2. [Assignment-2](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-2/)
|
2. [Assignment-2](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-2/)
|
||||||
3. [Assignment-3](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-3/)
|
3. [Assignment-3](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-3/)
|
||||||
4. [Assignment-4](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-4/)
|
4. [Assignment-4](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-4/)
|
||||||
|
5. [Assignment-5](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-5/)
|
||||||
|
|
||||||
## Question Papers
|
## Question Papers
|
||||||
- [IN-SEM](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Question%20Papers/IN-SEM)
|
- [IN-SEM](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Question%20Papers/IN-SEM)
|
||||||
|
Loading…
Reference in New Issue
Block a user