Advertisement
Guest User

Untitled

a guest
Mar 19th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/bash
  2. # Accepts command-line arg telling Arduino how many times to blink
  3. #+ (0 - 9).
  4. DEFAULT=1          
  5.  
  6. if [ -z "$1" ]    
  7. then
  8.   blinks=$DEFAULT
  9. else
  10.   blinks=$1
  11. fi
  12.  
  13. port=/dev/ttyAMA0  # Direct connection to Pi rx and dx pins.
  14.  
  15. echo $blinks > $port
  16.  
  17. exit $?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement