Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
633d5359a3 | ||
|
|
c731847f44 | ||
|
|
e4db614340 | ||
|
|
072bececb1 | ||
|
|
0c729180a9 | ||
|
|
892e2fdc8b |
13
README.md
13
README.md
@@ -1 +1,14 @@
|
||||
# Bugmotion
|
||||
|
||||
This software is mainly intended to detect and capture bugs that are in the given area.
|
||||
|
||||
This is done by using the following Hardware
|
||||
|
||||
- Pi 4 - https://www.raspberrypi.com/products/raspberry-pi-4-model-b/
|
||||
- PIR Sensor - https://www.jaycar.com.au/arduino-compatible-pir-motion-detector-module/p/XC4444?pos=1&queryId=7eb275c75b51605afa44da86b7b83db3
|
||||
- Picamera - https://www.raspberrypi.com/products/camera-module-v2/
|
||||
- LED Light - Any GPIO Compatible Kind
|
||||
- 10K Ohm Resistor - https://www.jaycar.com.au/10k-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0596?pos=13&queryId=60433157b9802b233ba599eda37e22f4&sort=0.relevance
|
||||
|
||||
|
||||
The Current Software uses Python to capture the Pictures of the bugs.
|
||||
|
||||
9
main.py
9
main.py
@@ -13,7 +13,7 @@ GPIO.setup(22, GPIO.OUT) #LED output pin
|
||||
cwd = os.getcwd() #Sets the Current Working Directory
|
||||
|
||||
|
||||
|
||||
print("\nProgram Running!")
|
||||
|
||||
#To stabilize sensor and Camera
|
||||
time.sleep(2)
|
||||
@@ -22,13 +22,12 @@ while True:
|
||||
#Waits for Motion from PIR Sensor
|
||||
pir.wait_for_motion()
|
||||
|
||||
print("Bug detected")
|
||||
print("\nBug detected")
|
||||
|
||||
#Turns on the LED Flash
|
||||
GPIO.output(22, 1)
|
||||
|
||||
#Sets Img path and filename, Saves to Working directory of Script
|
||||
print("\nFile will be Saved in: " + cwd + "/Pictures")
|
||||
file_name = cwd + "/Pictures/Capture_" + str(time.time()) + ".jpg"
|
||||
print("\nFile Name is: " + file_name)
|
||||
|
||||
@@ -48,6 +47,10 @@ while True:
|
||||
#Used to turn off the LED
|
||||
GPIO.output(22, 0)
|
||||
|
||||
#Used to stabilize Sensor and allow the Camera to refocus
|
||||
time.sleep(2)
|
||||
print("\nSystem Ready!")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user