Skip to main content

GPIO pins for control

# This setting defines which Raspberry Pi GPIO pin (BOARD numbering!) will jump to which file in the playlist (first file has index 0)
# See: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html for info about the pin numbers
# the pins are pulled high so you need to connect your switch to the selected pin and Ground (e.g. pin 9) - there is some debouncing done in software
# The accepted settings are like this: "pinnumber" : videoindex or "pinnumber" : "filename" or "pinnumber" : "-1" or "pinnumber" : "+1"
# its also possible to send "keyboard commands" like shutdown or pause (see readme for available keyboard commands)
# the format follows the pygame key list (https://www.pygame.org/docs/ref/key.html) see example below. "keyboard_control" needs to be enabled for this to work
# to enable GPIO set a gpio_pin_map like in the example below or just enable all the example mappings.
gpio_pin_map = "37": "-1", "33": "+1"
#gpio_pin_map = "11" : 1, "33": "+1", "16": "+2", "18": "-1", "15": "video.mp4", "19": "K_SPACE", "21": "K_p"
# Example:
# Pin 11 starts the 2nd video in the playlist, 
# pin 13 starts the 5th video, 
# pin 16 jumps 2 videos ahead,
# pin 18 jumps one video back,
# pin 15 plays a file with name "video.mp4" (if it exists),
# pin 19 sends the "spacebar" to the looper, pausing the current video
# pin 21 sends the "p" key and thus triggers the shutdown of the Raspberry Pi