Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Detect Camera on boot up

Wed Jun 15, 2016 3:12 pm

Is it possible for a Pi3 to detect whether the camera is plugged in on boot up, and, if it is, automatically run a Python program?
If so, how?
Thanks,

CJ

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

Re: Detect Camera on boot up

Wed Jun 15, 2016 3:33 pm

Code: Select all

[email protected]$ vcgencmd get_camera
supported=1 detected=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.

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Detect Camera on boot up

Wed Jun 15, 2016 3:46 pm

Thanks 6by9. How do I incorporate that to run a python script?

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

Re: Detect Camera on boot up

Wed Jun 15, 2016 3:56 pm

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.

Return to “Camera board”