Merge branch 'Production' of https://github.com/Jordan-Fielding/Bugmotion into Production
Conflicts: main.py
This commit is contained in:
15
README.md
15
README.md
@@ -1 +1,14 @@
|
||||
# Bugmotion
|
||||
# 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.
|
||||
|
||||
7
main.py
7
main.py
@@ -13,7 +13,7 @@ GPIO.setup(22, GPIO.OUT) #LED output pin
|
||||
cwd = os.getcwd() #Sets the Current Working Directory
|
||||
|
||||
|
||||
|
||||
print("Program 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("\nBug 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)
|
||||
|
||||
@@ -47,8 +46,6 @@ while True:
|
||||
|
||||
#Used to turn off the LED
|
||||
GPIO.output(22, 0)
|
||||
|
||||
print("\nBug Not Detected! - System Ready! ")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user