Compare commits
4 Commits
99ad4d781c
...
a4f9d400e8
Author | SHA1 | Date | |
---|---|---|---|
a4f9d400e8 | |||
f4a3da2dcc | |||
446aaeb2f7 | |||
1197a79bcb |
16
Practical/Assignment-5/IoT - Code-5.sh
Executable file
16
Practical/Assignment-5/IoT - Code-5.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
: '
|
||||||
|
THIS CODE HAS BEEN TESTED ON RASPBERRY PI 3B, 4B AND IS FULLY OPERATIONAL.
|
||||||
|
|
||||||
|
Problem Statement: Picamera
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
cd /home/$(whoami)/Desktop/ # Changing current working directory to Desktop
|
||||||
|
raspicam-still -o test.jpg # Image
|
||||||
|
libcamera-vid --codec h254 vid.h264
|
||||||
|
|
||||||
|
# END OF CODE
|
||||||
|
|
BIN
Practical/Assignment-5/IoT - Handout-5.pdf
Normal file
BIN
Practical/Assignment-5/IoT - Handout-5.pdf
Normal file
Binary file not shown.
BIN
Practical/Assignment-5/IoT - Write-up-5.pdf
Normal file
BIN
Practical/Assignment-5/IoT - Write-up-5.pdf
Normal file
Binary file not shown.
@ -16,11 +16,13 @@ GPIO.cleanup()
|
|||||||
GPIO.setup(16, GPIO.IN) # Set GPIO 16 as input for water level sensor signal
|
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
|
GPIO.setup(6, GPIO.OUT) # Set GPIO 6 as output for LED
|
||||||
|
|
||||||
while True:
|
try:
|
||||||
if (GPIO.input(16))
|
while True:
|
||||||
GPIO.output(6, True) # Turn ON LED if water detected
|
if (GPIO.input(16))
|
||||||
else
|
GPIO.output(6, True) # Turn ON LED if water detected
|
||||||
GPIO.output(6, False) # Keep LED OFF if no water detected
|
else
|
||||||
|
GPIO.output(6, False) # Keep LED OFF if no water detected
|
||||||
GPIO.cleanup()
|
except KeyboardInterrupt:
|
||||||
|
GPIO.cleanup()
|
||||||
|
print("Program exited by user.")
|
||||||
# END OF CODE
|
# END OF CODE
|
@ -18,6 +18,8 @@
|
|||||||
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/)
|
||||||
|
6. [Assignment-6](https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems/src/branch/main/Practical/Assignment-6/)
|
||||||
|
|
||||||
## 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