Advertisement
Grommish

Untitled

Sep 1st, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. GNU nano 4.8 rc.local
  2. # Set the front LED to on to show boot finished
  3. # Bridge (Orange), Router (Blue), Gateway (Cyan)
  4. filename="/tmp/sysinfo/board_name"
  5.  
  6. while read -r line; do
  7. mode="$line"
  8. done < "$filename"
  9.  
  10. case $mode in
  11. "itus_shield-bridge")
  12. gpio=9
  13. ;;
  14. "itus_shield-router")
  15. gpio=11
  16. ;;
  17. "itus_shield-gateway")
  18. gpio=10
  19. ;;
  20. esac
  21.  
  22. echo $gpio > /sys/class/gpio/export
  23. echo out > /sys/class/gpio/gpio$gpio/direction
  24. echo 0 > /sys/class/gpio/gpio$gpio/value
  25. echo $gpio > /sys/class/gpio/unexport
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement