Compare commits
No commits in common. "1110a2e0346a03052ca65f24c15f3d6b832bfcb9" and "8f10c4ffa5b0ed881d1c8526d22a187f85c4fc9e" have entirely different histories.
1110a2e034
...
8f10c4ffa5
@ -1,26 +0,0 @@
|
|||||||
"""
|
|
||||||
THIS CODE HAS BEEN TESTED ON RASPBERRY PI 3B and 4B AND IS FULLY OPERATIONAL.
|
|
||||||
|
|
||||||
Problem Statement: IR Sensor
|
|
||||||
|
|
||||||
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 time
|
|
||||||
|
|
||||||
GPIO.setmode(GPIO.BCM)
|
|
||||||
GPIO.setwarnings(False)
|
|
||||||
GPIO.cleanup()
|
|
||||||
GPIO.setup(16,GPIO.IN)
|
|
||||||
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
if (GPIO.input(16)):
|
|
||||||
print("No object")
|
|
||||||
else:
|
|
||||||
print("Object Detected")
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
GPIO.cleanup()
|
|
||||||
# END OF CODE
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user