Falcon Christmas

The Lab (Technical Talk) => Snippet Share => Topic started by: dreiman on November 08, 2019, 09:52:47 PM

Title: Better single button control. Start, stop & next song
Post by: dreiman on November 08, 2019, 09:52:47 PM
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.

Powered by SMFPacks Menu Editor Mod