Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement two keyboard buttons for usage in addition to hardware buttons. #524

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nsty
Copy link
Contributor

@nsty nsty commented Sep 26, 2023

I built wireless hardware buttons based on an ESP32 emulating a BLE keyboard and connecting to a Raspberry Pi running Pibooth. Pibooth does already support the control with a keyboard (for debugging?) but the keys change from view to view. On the intro view one can only continue with the keys P or Ctrl + E, on the choice view one need to press arrow keys left or right.

With the changes I implemented, the control of all views (except the settings) is now possible with only the two arrow keys left and right in addition to the two hardware buttons directly connected to the Pi. Thus, my two BLE wireless buttons can now just send the two respective keys to control Pibooth wirelessly from the photo area.

I didn't see any conflicts occurring with the implementation as it doesn't remove but only adds functionality.

@srvoets
Copy link

srvoets commented Oct 18, 2023

Hey mate I have been looking to do exactly this. Rather than re-invent the wheel can you point me to what you loaded onto the ESP32, and if any STL files you used?

Also, how do I use this merge with my build?

Would like to get these buttons going before a Halloween party next week, thanks!

@srvoets
Copy link

srvoets commented Oct 19, 2023

Hey mate I have been looking to do exactly this. Rather than re-invent the wheel can you point me to what you loaded onto the ESP32, and if any STL files you used?

Also, how do I use this merge with my build?

Would like to get these buttons going before a Halloween party next week, thanks!

OK I got my button and esp32 as an hid device, however, I am having an issue trying to get your version with the keyboard commands running.

Copy link
Member

@werdeil werdeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, I have one small comment

pibooth/booth.py Outdated Show resolved Hide resolved
Co-authored-by: Vincent Verdeil <werdeil@hotmail.com>
@nsty
Copy link
Contributor Author

nsty commented Nov 5, 2023

@srvoets Sorry probably too late now. I used ESPHome BLE Keyboard for the job because it was the fastest for me to accomplish this. I used a XIAO ESP32C3 with a battery connected directly to it, an arcade push button between GPIO9 and GND, and LED built-in with the push button between GPIO10 and 3V3. No need for any additional hardware components like pull-up resistors etc. Still, this was a quick and dirty solution. I will probably rework this for the next use and then publish it.

Edit: Add reference to gist: Photobox Button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants