AnonymousCookie37

/usr/local/sbin/eStop

May 3rd, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Set the pin for input
  4. gpio -g mode 4 up
  5. gpio -g mode 4 in
  6.  
  7. # Set the variable through command substitution
  8. b=$(gpio -g read 4)
  9.  
  10. # Echo the value to the console
  11. echo "$b"
Advertisement
Add Comment
Please, Sign In to add comment