Anyone else looked at the sample provided for uart?
#!/bin/bash
cd `dirname $0`
if [ $# -ne 1 ]; then
echo "Usage: $0 MESSAGE"
exit 1
else
msg=$1
fi
delay=3
uart_id=1
rate=115200
setup()
{
uart_id=1
delay=3
}
loop()
{
echo "connect your PC with the board via uart${uart_id}, baund rate $rate"
sudo rmmod sun4i-gpio -f 2>/dev/null
sudo chmod 777 /dev/ttyS${uart_id}
killall microcom > /dev/null 2>&1
killall busybox > /dev/null 2>&1
busybox microcom -s $rate /dev/ttyS${uart_id} 2>/dev/null &
while [ 1 ]; do
echo -e "$msg\r\n" > /dev/ttyS${uart_id}
sleep $delay
done
}
main()
{
setup
loop
}
main
This looks like a bash script and nothing like arduino C style code. I posted on the pcDuino forum and waiting for a reply.
What am I missing? Maybe Sparkfun knows something?