Quantcast
Channel: User Mohammad Ali - Raspberry Pi Stack Exchange
Viewing all articles
Browse latest Browse all 44

Answer by Mohammad Ali for How to light up picamera LED without taking photo

$
0
0

You can turn on the camera led through the pi’s GPIO using the python code below:

 #!/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 = 5   # Set GPIO to output GPIO.setup(CAMLED, GPIO.OUT, initial=False) GPIO.output(CAMLED,True) # On time.sleep(1) GPIO.output(CAMLED,False) # Off

 But I believe that this may require you to first disable the red led by adding the following line:

disable_camera_led=1

To your config file which can be opened with the following command:

sudo nano /boot/config.txt

Viewing all articles
Browse latest Browse all 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>