Difference between revisions of "Arduino ledOn-1"
(New page: Make sure to change the UNIT1 variable to reflect the correct tty... <code><pre> #!/bin/bash -e # by Roland Latour, Feb.2008, GPLv2, see 'man gpl' UNIT1=/dev/tty.usbserial-A6004osu if [...) |
|||
Line 1: | Line 1: | ||
− | |||
Make sure to change the UNIT1 variable to reflect the correct tty... | Make sure to change the UNIT1 variable to reflect the correct tty... | ||
Line 6: | Line 5: | ||
# by Roland Latour, Feb.2008, GPLv2, see 'man gpl' | # by Roland Latour, Feb.2008, GPLv2, see 'man gpl' | ||
− | UNIT1=/dev/tty.usbserial-A6004osu | + | #UNIT1=/dev/tty.usbserial-A6004osu |
+ | UNIT1=/dev/ttyUSB0 | ||
if [ -e $UNIT1 ]; then | if [ -e $UNIT1 ]; then | ||
# send the command | # send the command |
Revision as of 09:45, 31 October 2008
Make sure to change the UNIT1 variable to reflect the correct tty...
#!/bin/bash -e
# by Roland Latour, Feb.2008, GPLv2, see 'man gpl'
#UNIT1=/dev/tty.usbserial-A6004osu
UNIT1=/dev/ttyUSB0
if [ -e $UNIT1 ]; then
# send the command
/bin/echo -e -n "w d 13 1\n" > $UNIT1
else
/bin/echo "Unit 1 not plugged in."
fi
# set up similar aliases for the other IO pins, when you name those pins