andreknieriem / photobooth

A photobooth Web-Application for raspberry pi with gphoto2
https://photobooth.andrerinas.de/
MIT License
299 stars 163 forks source link

External Button on Raspberry with Tablet as Display #284

Closed Matz3187 closed 2 years ago

Matz3187 commented 3 years ago

Hello :)

I'm using an Android Tablet for showing the Webinterface which is hosted on a Raspberry Pi. The Solution with the hardware button python script requires that the webinterface is shown directly on Raspberry. I want to use an external Button which is connected on a GPIO pin on Raspberry and also want to use the Tablet for display.

My Idea:

Do you think this is possible?

Kind Regards Matthias

andi34 commented 3 years ago

Remotebuzzer Implementation was added on my fork already: https://github.com/andi34/photobooth/releases

Matz3187 commented 3 years ago

Is it possible in your fork to start countdown on the Tablet when the remotebuzzer is connected to the raspberry and not to the tablet?

andi34 commented 3 years ago

Yes. https://github.com/andi34/photobooth/wiki/FAQ#can-i-use-hardware-button-on-my-raspberry-pi-to-take-a-picture

ghost commented 3 years ago

I Have problems with the hardware button. I pull GPIO21 to ground but no picture is taken. How to connect the Button?

andi34 commented 3 years ago

Depends on your Photobooth version and maybe on how you're accessing your Photobooth (display connected on a Pi? Tablet?).

On v2.1 or older: You need to follow https://github.com/andreknieriem/photobooth/wiki/FAQ#can-i-use-hardware-button-to-take-a-picture-on-my-raspberry-pi ;

On v3.x: Follow https://github.com/andi34/photobooth/blob/dev/faq/faq.md#can-i-use-hardware-button-on-my-raspberry-pi-to-take-a-picture ; thanks to the remotebuzzer you can access Photobooth also on a different device (e.g. Tablet) and the button takes affect.

ghost commented 3 years ago

I have a display directly connected and I use version 3.x. But in your tutorial there is gpio21 named as picture gpio. And what about the gpio0 to ground? I am so lost :D

ghost commented 3 years ago

I got this error: Remote Buzzer Server [1020]: buttonActiveCheck error state - requested GPIO 21 , for value 0 but buttonIsPressed: 21

ghost commented 3 years ago

Got it, with an pull-up resistor to 3.3V it works fine. Sorry.