How to turn off Raspberry Pi Camera red led ?

Vineet Kumar Gupta
2 min readNov 28, 2020

--

So this might be one the like simplest thing you wanna do with your raspberry pi camera .

The Led in the raspberry pi camera 1 as well as v2 is quite bright and as a matter of fact we can manually control it and use it like we are using a led directly connected to raspberry pi GPIO pins

Step 1 : Login into raspberry pi using normal gui or ssh

Step 2 : Run this line in terminal

sudo nano /boot/config.txt

we need to modify the config file in order to set off the led this line opens config file in nano text editor

Step 3 : Scroll down to the file end using arrow keys

Config file window

Step 4: Add the following line in the end of the file

disable_camera_led=1

Press ctrl+ s and then ctrl + x and save the file and exit

Step 5: Reboot the pi by using the following command

sudo reboot now 

Now test by running the following script in python3

import time
import picamera

with picamera.PiCamera() as camera:
camera.resolution = (1024, 768)
camera.start_preview()
camera.led= False
time.sleep(2)
camera.capture('foo.jpg')
camera.led= False

Happy Experimenting :)

Connect with me on Instagram Linkedin

--

--

Vineet Kumar Gupta
Vineet Kumar Gupta

Written by Vineet Kumar Gupta

Interested in Data Science, IOT & most probably anything related to computer science and engineering. https://www.linkedin.com/in/vineet-kumar-gupta/