Skip to content

Instantly share code, notes, and snippets.

Created Apr 10, 2019
What would you like to do?
GPIO Toggle Script for JS8Call
if [ $# -le 0 ]; then
echo -e "\nUsage:\n$0 state \n"
exit 1
if [ "$STATE" = "on" ]; then
echo "toggling gpio $PIN on";
gpio write $PIN 1
echo "toggling gpio $PIN off";
gpio write $PIN 0

This comment has been minimized.

Copy link
Owner Author

@jsherer jsherer commented Apr 10, 2019

How to use:

  1. Copy this script to a location on your machine
  2. Edit the PIN variable if you need it to be a different GPIO pin than number 12
  3. Make the script executable: chmod +x /path/to/
  4. Test that it works: /path/to/ on and /path/to/ off
  5. Configure JS8Call to use it as a PTT Command: /path/to/ %1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment