News:

LATEST RELEASE:  FPP 6.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/6.1

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15500
Latest: baggiorobertson1
New This Month: 8
New This Week: 36
New Today: 2
Stats
Total Posts: 127144
Total Topics: 15597
Most Online Today: 68
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 7
Guests: 33
Total: 40

How to connect a button (via GPIO) to a K16A-B

Started by pierlux, September 17, 2022, 11:34:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pierlux

I'm following these tutorials 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.  

You cannot view this attachment.

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.

dkulp

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.
Daniel Kulp - https://kulplights.com

pierlux

#2
Here's how to start a playlist when a button is pressed.  I striked 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
  • 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.

2. Setup the wiring
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.

You cannot view this attachment.
3. 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.

You cannot view this attachment.

4. 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 Pull UpNone/External 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.

dkulp

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.   
   
Daniel Kulp - https://kulplights.com

Poporacer

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.
If to err is human, I am more human than most people.

pierlux

#5
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!

Support FPP

+- Recent Topics

FPP 6.2 Video Issue by ppanelli3
Today at 12:04:54 PM

Raspberry PI 4 won't connect to WIFI by rbarry1068
Today at 11:18:38 AM

Sequence freeze by Poporacer
Today at 11:04:54 AM

Beagle Bone Black for sale by ppanelli3
Today at 10:40:18 AM

Port 11 not working by rossg10
Today at 09:57:03 AM

Remote script issue by mac1321
Today at 06:43:26 AM

BRP Voting Plugin - Allow others to vote for your songs! by plaberge
December 02, 2022, 11:15:17 PM

Bacground sequence by darylc
December 02, 2022, 07:34:21 PM

Fpp 6.2 ui password by darylc
December 02, 2022, 07:30:33 PM

Updating from FPP Version 3.5.4 to the latest FPP 6.1 by Poporacer
December 02, 2022, 07:07:09 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod