Restarting Sketch on 32U4 from Linino

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.

whisprer:
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

wayoda:

whisprer:
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