Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ###
  4. ## download and make https://github.com/6by9/rpi3-gpiovirtbuf
  5. ## put into PATH or fill in below
  6.  
  7.  
  8. RPI3_GPIOVIRTBUF=/home/pi/rpi3-gpiovirtbuf/rpi3-gpiovirtbuf2
  9.  
  10.  
  11.  
  12. if which rpi3-gpiovirtbuf 2>&1 > /dev/null; then
  13.     RPI3_GPIOVIRTBUF=rpi3-gpiovirtbuf
  14. elif [ ! -f "$RPI3_GPIOVIRTBUF" ]; then
  15.     echo "Cant find rpi3-gpiovirtbuf - download from https://github.com/6by9/rpi3-gpiovirtbuf"
  16.     exit 1
  17. fi
  18.  
  19. if [ "x$1" == "x" ]; then
  20.     echo "Ussage: $0 on or $0 off"
  21.     exit 1
  22. fi
  23.  
  24. if [ "$1" == "1" ] || [ "$1" == "ON" ] || [ "$1" == "On" ] || [ "$1" == "on" ]; then
  25.      $RPI3_GPIOVIRTBUF g 134 1 1 0 1
  26. else
  27.      $RPI3_GPIOVIRTBUF g 134 0 1 0 1
  28. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement