Compare commits
No commits in common. "8e6fb18c16601d42ceb437e0a87c309b72bb45b1" and "4aad7f3b7425981ebc535512a8714c21401520cf" have entirely different histories.
8e6fb18c16
...
4aad7f3b74
@ -13,17 +13,14 @@ 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
|
||||
GPIO.setup(16,GPIO.IN)
|
||||
|
||||
try:
|
||||
while True:
|
||||
if (GPIO.input(16)):
|
||||
print("No object")
|
||||
GPIO.output(26,GPIO.LOW) # LED OFF when no object detected
|
||||
else:
|
||||
print("Object Detected")
|
||||
GPIO.output(26,GPIO.HIGH) # LED ON when object detected
|
||||
except KeyboardInterrupt:
|
||||
GPIO.cleanup()
|
||||
# END OF CODE
|
||||
|
@ -6,13 +6,6 @@ Problem Statement: Temperature and humidity sensing using DHT11.
|
||||
Code from InternetOfThingsAndEmbeddedSystems (SPPU - Third Year - Computer Engineering - Content) repository on KSKA Git: https://git.kska.io/sppu-te-comp-content/InternetOfThingsAndEmbeddedSystems
|
||||
"""
|
||||
|
||||
# NOTE: PLEASE REFER DHT11 repo by notkshitij for initialization: https://git.kska.io/notkshitij/DHT11/
|
||||
|
||||
# This code will only work in the virtual environment
|
||||
# To enable the virtual environment, change current working directory using 'cd <DIR>'
|
||||
# Activate the virtual environment using 'source bin/activate'
|
||||
# Run this code 'python3 IoT\ -\ Code-4.py'
|
||||
|
||||
# BEGINNING OF CODE
|
||||
# NOTE: GPIO PIN 16 used
|
||||
|
||||
@ -36,8 +29,6 @@ try:
|
||||
print("Humidity: %-3.1f %%" % result.humidity)
|
||||
else:
|
||||
print("Error: %d" % result.error_code)
|
||||
# Error 1 implies sensor not detected, thus no data
|
||||
# Error 2 implies checksum error, data corrupted, i.e. GPIO connection might be lose
|
||||
time.sleep(3)
|
||||
except KeyboardInterrupt:
|
||||
print("Program stopped by user.")
|
||||
|
@ -8,9 +8,6 @@ Code from InternetOfThingsAndEmbeddedSystems (SPPU - Third Year - Computer Engin
|
||||
|
||||
# BEGINNING OF CODE
|
||||
|
||||
# Run these command one by one manually in the terminal.
|
||||
# Image and video file will be saved in Desktop directory of the cuurent user.
|
||||
|
||||
cd /home/$(whoami)/Desktop/ # Changing current working directory to Desktop
|
||||
raspicam-still -o test.jpg # Image
|
||||
libcamera-vid --codec h254 vid.h264
|
||||
|
@ -19,6 +19,7 @@
|
||||
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/)
|
||||
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
|
||||
- [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