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: 15524
Latest: fighteriris
New This Month: 32
New This Week: 20
New Today: 3
Stats
Total Posts: 127343
Total Topics: 15630
Most Online Today: 135
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 12
Guests: 65
Total: 77

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

What am I doing wrong? FPP I’m ZCCP? by rudybuddy
Today at 09:01:26 AM

FPP Playlist by dkulp
Today at 07:14:42 AM

Setting up LOR to serial of F16v3 and configure in xLights by brmeadows
Today at 05:46:42 AM

FPP not releasing control to WLED when idle by Poporacer
December 06, 2022, 10:39:18 PM

1 player/2 remote by Poporacer
December 06, 2022, 08:07:48 PM

K8-PB Network Issue by Kensington Graves
December 06, 2022, 07:40:50 PM

Failed V1.03 diff receiver boards by bud29
December 06, 2022, 07:13:38 PM

XLights Variant by Poporacer
December 06, 2022, 06:56:52 PM

FPP Oddness. Remote not remoting, schedule not scheduling??? by Poporacer
December 06, 2022, 06:27:33 PM

Text inverted by dreiman
December 06, 2022, 06:12:17 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod