Start work on camera script
This commit is contained in:
parent
9aa8e533eb
commit
60271ce420
22
camera/camera.py
Executable file
22
camera/camera.py
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
|
|
||||||
|
import time
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
|
IR_PIN = 3
|
||||||
|
|
||||||
|
GPIO.setmode(GPIO.BOARD)
|
||||||
|
GPIO.setup(IR_PIN, GPIO.OUT)
|
||||||
|
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
print "Gpio Low"
|
||||||
|
GPIO.output(IR_PIN, GPIO.LOW)
|
||||||
|
time.sleep(20)
|
||||||
|
print "Gpio High"
|
||||||
|
GPIO.output(IR_PIN, GPIO.HIGH)
|
||||||
|
time.sleep(20)
|
||||||
|
except Exception as e:
|
||||||
|
print e
|
||||||
|
finally:
|
||||||
|
GPIO.cleanup()
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.1 MiB |
Loading…
x
Reference in New Issue
Block a user