Go Down

Topic: Restarting Sketch on 32U4 from Linino (Read 352 times) previous topic - next topic

whisprer

A previous post led me on to this question, of which I believe the answer would be useful to many.

Is there a way to restart the Arduino sketch from Linino? This could then be setup as a startup script to reboot the 32U4 whenever Linino reboots. Thanks for any ideas.

wayoda


Is there a way to restart the Arduino sketch from Linino?


There is a litte bash-script  /usr/bin/reset-mcu
You can call it from the commandline or from a script that runs at startup.
I guess the original use case for the script is to reset the Arduino before uploading a new sketch.

Eberhard


whisprer

#2
Mar 21, 2014, 06:09 pm Last Edit: Mar 25, 2014, 02:31 pm by whisprer Reason: 1


Is there a way to restart the Arduino sketch from Linino?


There is a litte bash-script  /usr/bin/reset-mcu
You can call it from the commandline or from a script that runs at startup.
I guess the original use case for the script is to reset the Arduino before uploading a new sketch.

Eberhard


Thank you, this is exactly what I needed.

I would recommend anyone using the Bridge in their sketch to add this to 'Local Startup' in Luci:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

wifi-live-or-reset
/usr/bin/reset-mcu
exit 0

Go Up