Arduino setup-Arduino
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