Skip to content

layereight/gpio-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gpio-trigger

  • trigger arbitrary action when a gpio button is pressed on a Raspberry Pi
  • supported actions are
    • curling a URL
    • executing a command line

Usage

gpio-trigger.py <gpio_pin_number> <action_type> <action>
  • example:
gpio-trigger.py 13 curl 'http://localhost:3000/api/v1/commands/?cmd=volume&volume=plus'
gpio-trigger.py 5 command '/usr/bin/amixer -c sndrpihifiberry sset SoftMaster 2%-'
gpio-trigger.py 4 command 'shutdown -h now'

Releases

No releases published

Packages

No packages published