Difference between revisions of "Arduino setup-Arduino"
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
if [ -e $UNIT1 ]; then | if [ -e $UNIT1 ]; then | ||
− | stty - | + | stty -F $UNIT1 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts |
echo "Unit 1 initialized." | echo "Unit 1 initialized." | ||
cat $UNIT1 >> logfile1.raw & | cat $UNIT1 >> logfile1.raw & | ||
Line 31: | Line 31: | ||
</pre></code> | </pre></code> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | [[Category:CSC231]][[Category:Arduino]] |
Latest revision as of 18:28, 8 October 2010
Make sure to change UNIT1 to reflect the correct driver/port
# 'source' this file
# by Roland Latour, Feb.2008, GPLv2, see 'man gpl'
# initializes the port with 'stty', and starts a helper process.
alias loadData='oocalc --import logfile1.csv'
echo "Created loadData alias to start OOCalc and import data"
if [ -e logfile1.csv ]; then
mv logfile1.csv logfile1.csv.old
fi
# Put titles on data in spreadsheet
echo "Time,Chan0,Chan1,Chan2,Chan3,Chan4,Chan5" > logfile1.csv
# Initialize UNIT1
export UNIT1=/dev/tty.usbserial-A6004osu
if [ -e $UNIT1 ]; then
stty -F $UNIT1 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
echo "Unit 1 initialized."
cat $UNIT1 >> logfile1.raw &
echo "Started helper process."
else
echo "Unit 1 not plugged in."
fi
# repeat above lines for UNIT2 etc., if needed