Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Accepts command-line arg telling Arduino how many times to blink
- #+ (0 - 9).
- DEFAULT=1
- if [ -z "$1" ]
- then
- blinks=$DEFAULT
- else
- blinks=$1
- fi
- port=/dev/ttyAMA0 # Direct connection to Pi rx and dx pins.
- echo $blinks > $port
- exit $?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement