Arduino ledOn-1

From dftwiki3
Revision as of 09:45, 31 October 2008 by Thiebaut (talk | contribs)
Jump to: navigation, search

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