Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import time
- import RPi.GPIO as GPIO
- # Use GPIO numbering
- GPIO.setmode(GPIO.BCM)
- # Set GPIO for camera LED
- # Use 5 for Model A/B and 32 for Model B+
- CAMLED = 32
- # Set GPIO to output
- GPIO.setup(CAMLED, GPIO.OUT, initial=False)
- # between on and off
- for i in range(5):
- GPIO.output(CAMLED,GPIO.HIGH) # On
- time.sleep(2)
- GPIO.output(CAMLED,GPIO.LOW) # Off
- time.sleep(2)
- GPIO.cleanup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement