Difference between revisions of "Arduino setup-Arduino"
(New page: Make sure to change '''UNIT1''' to reflect the correct driver/port <code><pre> [18:01:05] ~/temp$: cat setup-Arduino # 'source' this file # by Roland Latour, Feb.2008, GPLv2, see 'man g...) |
|||
Line 2: | Line 2: | ||
<code><pre> | <code><pre> | ||
− | + | ||
# 'source' this file | # 'source' this file | ||
# by Roland Latour, Feb.2008, GPLv2, see 'man gpl' | # by Roland Latour, Feb.2008, GPLv2, see 'man gpl' |
Revision as of 05:52, 7 August 2008
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