raspigeorge
Posts: 3
Joined: Thu Jun 30, 2016 1:20 pm

Camera LED Pi3

Thu Jun 30, 2016 1:28 pm

I have controlled the camera led light (on/off) in the Rasperry (B+) Pi1 by using gpio5 commands. In the Pi 3 (B+) this does not work. Has something changed in the gpio hardware?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8920
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Camera LED Pi3

Thu Jun 30, 2016 2:02 pm

Yes, the overall Pi hardware has changed. It had also changed on all B+, A+, and Pi2's, although that was only to another GPIO (32).
For discussion on controlling the Pi3 camera LED see viewtopic.php?f=43&t=109137&start=100#p989832 and the 4 posts that follow it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

raspigeorge
Posts: 3
Joined: Thu Jun 30, 2016 1:20 pm

Re: Camera LED Pi3

Fri Jul 01, 2016 9:30 am

Thank You very much for Your quick and friendly answer. My technical knowledge concerning this issue is quite poor. Working with gpio commands was quite feasible for me, but it doesn't work any more. Is there any easy to implement workaround for controlling the led of the Pi-Cam? As far as I understand the posts referred by You, one must use a virtual driver for controlling the gpio in Pi 3?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8920
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Camera LED Pi3

Fri Jul 01, 2016 11:02 am

You don't say what language you're using or why you're trying to control the LED.
I've just cleaned up the code from the other thread and pushed it to https://github.com/6by9/rpi3-gpiovirtbuf

Code: Select all

git clone https://github.com/6by9/rpi3-gpiovirtbuf.git
cd rpi3-gpiovirtbuf
make
and providing I haven't made any typos, you should get an executable (otherwise you're missing build dependencies - "sudo apt-get install build-essentials" will probably solve most issues)
You can then use "./ rpi3-gpiovirtbuf 134 1" to turn the LED on, and "./ rpi3-gpiovirtbuf 134 0" to turn it off.

The code is simple enough that you should be able to pull out the relevant bits if you're working in C.

edit Due to nitpicking on the other thread, I've amended the app. So the correct command line is now
"./ rpi3-gpiovirtbuf s 134 1" for on, and "./ rpi3-gpiovirtbuf s 134 0" for off.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
bensimmo
Posts: 4622
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Camera LED Pi3

Fri Jul 01, 2016 12:08 pm

Picamera for python has a command and you can put it in the config.txt boot file if it's just to turn it off.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8920
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Camera LED Pi3

Fri Jul 01, 2016 12:47 pm

bensimmo wrote:Picamera for python has a command
Ahem https://github.com/waveform80/picamera/issues/265
bensimmo wrote:and you can put it in the config.txt boot file if it's just to turn it off.
Which is hardly controlling it. I'm assuming the OP wants more than just "disable_camera_led=1"
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
bensimmo
Posts: 4622
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Camera LED Pi3

Fri Jul 01, 2016 2:58 pm

6by9 wrote:
bensimmo wrote:Picamera for python has a command
Ahem https://github.com/waveform80/picamera/issues/265
bensimmo wrote:and you can put it in the config.txt boot file if it's just to turn it off.
Which is hardly controlling it. I'm assuming the OP wants more than just "disable_camera_led=1"

I guess i've not noticed it on my Pi3, well nobody has complained to me anyway.
and I guess the docs need a side note adding ?
http://picamera.readthedocs.io/en/relea ... ng-the-led

I'm not assuming anything about what the OP wants :)
It is controlling it, if off is what you want.

raspigeorge
Posts: 3
Joined: Thu Jun 30, 2016 1:20 pm

Re: Camera LED Pi3

Sat Jul 02, 2016 11:29 am

Thank You very much for Your valuable help!

Return to “Camera board”