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: 15292
Latest: Rroark
New This Month: 38
New This Week: 7
New Today: 1
Stats
Total Posts: 125048
Total Topics: 15234
Most Online Today: 74
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 3
Guests: 40
Total: 43

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

Using GPIO inputs for multiple uses? by Poporacer
Today at 07:27:10 PM

K40 PB not transmitting music by Romeooscarbravo
Today at 05:42:20 PM

Micro-SD by Poporacer
Today at 09:46:41 AM

New K4-PB wifi problems by bossier17
Today at 08:38:32 AM

OrangePi 3 LTS wifi by ctmal
September 27, 2022, 04:57:48 PM

Pi Top on sale by JonB256
September 27, 2022, 04:44:05 PM

WiFi RGB Light Bulbs (Wiz or phillips) by smoothsa
September 27, 2022, 02:42:13 PM

Email Setup 6.1 by jem5136
September 27, 2022, 08:16:21 AM

Sequencing timing... by JonB256
September 27, 2022, 06:47:30 AM

K16a-b FPP setup by Dunkelzahn
September 26, 2022, 10:59:22 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod