RasPiArduino
RasPiArduino copied to clipboard
How I can run arduino sketch every time when pi reboots
trafficstars
apt-get install ntpdate
cat > /etc/rc.local <<EOL
#!/bin/sh -e
_IP=\$(hostname -I) || true
if [ "\$_IP" ]; then
printf "My IP address is %s\n" "\$_IP"
fi
# Sync Time
ntpdate-debian -u > /dev/null
# Start Sketch
/usr/local/bin/run-sketch > /dev/null
exit 0
EOL