News:

Server migration complete, Welcome to version 2.1.1

+-+-

+-User

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

+-Site Stats

Members
Total Members: 15290
Latest: eatumup
New This Month: 36
New This Week: 5
New Today: 4
Stats
Total Posts: 125007
Total Topics: 15226
Most Online Today: 89
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 4
Guests: 53
Total: 57

Better single button control. Start, stop & next song

Started by dreiman, November 08, 2019, 09:52:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dreiman

I have been playing and I have improved my single button control script.  You can do 3 things with 1 button. 

Quick press to start a specified playlist.
Quick press to skip to the next song.
Long press to stop the playlist.

This is all done with one button. 

You hook up your button or switch in the usual way following the schematic which can be found in the help section on the GPIO input page.

Upload both Pressed.sh and Release.sh.

Create an even for each. Name them what you want, but I make the name of the events the same as the file name without .sh.

Under GPIO inputs, on the pin that you will be connecting your switch output to, enable it, and for falling, set it to Pressed, and set rising to Released.

Restart FPPD.

Connect switch.

ENJOY!!

Support FPP

+- Recent Topics

K16a-b FPP setup by dkulp
Today at 06:15:18 AM

OrangePi 3 LTS wifi by ctmal
September 25, 2022, 05:27:37 PM

Pi Top on sale by CeP
September 25, 2022, 04:26:29 PM

no Lights by Poporacer
September 24, 2022, 06:47:12 PM

exceding 24000 starting channels by Poporacer
September 24, 2022, 05:53:25 PM

No signs of life, help by JonD
September 24, 2022, 02:44:30 PM

Sequencing timing... by Atljim965
September 24, 2022, 10:22:25 AM

OLED Screen Not Coming On by jja0607
September 23, 2022, 06:34:51 PM

How to connect a button (via GPIO) to a K16A-B by pierlux
September 23, 2022, 05:44:49 PM

Background Image (House) Not Visible In XLights by dkulp
September 23, 2022, 12:41:52 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod