I'm following these (https://www.instructables.com/Start-Your-Christmas-Light-Show-With-a-Button/) tutorials (https://learn.adafruit.com/connecting-a-push-button-to-beaglebone-black?view=all) on how to connect a button to a GPIO port to trigger events in FPP (such as starting a sequence).
On the K16A-B there's an I/O EXP connector and I expected to be able to use that to connect my button. Unfortunately I couldn't figure out what GPIO these were connected to – nor did the Zoom room.
Screen Shot 2022-09-17 at 13.27.50.png
Has anyone been successful at using them? Or would mind pointing me in the right direction? I promise to fully document this once I'm up and running.
At the bottom of the GPIO inputs page, there should be a bunch of pins that start with "pca". Those are the pins. 8 through 15 are available on the header.
Here's how to start a playlist when a button is pressed. I
the original text and made corrections based on comments below. There also are more detailed diagrams in the FPP Manual, have a look at that too.1. Material Needed
2. Setup the wiring
- 3 female jumber wires to connect to the pins.
- 2 wires to connect to your button
- 1 x 200 ohms resistor
- 1 momentary push button (that closes the circuit once pushed)
- Optional: 1 x solderless breadboard to prototype this.
Following the circuit in the image below, you will connect the 3.3V pin to your button and the other side of the button to the GPIO pin of your choice (more on where to find the pins below). When the button is open, the resistor will "pull" the voltage on the GPIO down to 0V by connecting it to the ground. When the button is closed, +3.3V will travel to the GPIO pin triggering an event in FPP.
circuit.jpg3. Finding the GPIO pins
On a K16A-B board, the pins are located in the lower left part of the board. The connector is labeled I/O EXP and has +3.3V, G and pins 8-15 available to use as GPIOs.
Screen Shot 2022-09-17 at 13.27.50.png4. Configure FPP 6.1
In FPP's web interface, go to Input/Output Setup
/ GPIO Inputs
. At the bottom of the page, you will find entries prefixed with pca.
In my case, entry pca9675-15
corresponds to pin 15 on the I/O EXP jumpers.
To play a song when the users releases the button, select
in the PULL UP/DOWN
combo box. Then select Start Playlist
in the COMMAND RISING EDGE
combo box. Select a playlist name if you need to.
Restart FPPD and voilà! The button should work.
If you are using an external pull down resistor, you don't want to enable the internal pull up resistor.
The buttons on the board are wired the other way. They connect the GPIO pin to ground. The internal pull up resistor is enabled. (no external resistors). The buttons don't need the 3.3V at all. The trigger is on the falling edge then.
Quote from: pierlux on September 17, 2022, 02:36:23 PMTo play a song when the users releases the button, select Pull Up in the PULL UP/DOWN combo box.
NO! like Dan stated (and it is covered in the FPP Manual) you do NOT want to configure the Pull UP/Down in the interface if you are using external Pull up/Down resistors using both can cause some overcurrent issues to the GPIO pins. The option states None/External and is the option if you are using External resistors.
Quote from: pierlux on September 17, 2022, 02:36:23 PMThen select Start Playlist in the COMMAND RISING EDGE combo box.
You can actually trigger two events, one for when the button is pressed (in your case rising edge) and another one for when the button is released (Falling edge in your case)
I would be very careful following tutorials for stock BeagleBone or Pi computers. Once another device is connected to them, things can be dramatically different than how they are without the added hardware. But Nice write up! Thanks for the contribution.
Thanks for the input, I'll check that.
The thing is that there's just too little information on how to do this with a beaglebone. Woa, I had never opened the FPP Manual as Google only has the 5.0 and 1.x indexed. There's way more details in there!