Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #set mode to output
  4. for i in 0 1 2 3 4 5 6 7;
  5. do gpio mode $i out;
  6. done;
  7.  
  8. #turn on LEDs 0 to 7
  9. for i in 0 1 2 3 4 5 6 7;
  10. do gpio write $i 1;
  11. done;
  12.  
  13. #wait 2 seconds
  14. sleep 2;
  15.  
  16. #turn LEDs off
  17. for i in 0 1 2 3 4 5 6 7;
  18. do gpio write $i 0;
  19. done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement