How to RESET running code on Intel Galileo

638 Views Asked by At

I am working on Intel Galileo board(Linux running on board) and using arduino as development environment.

Now on getting a particular gpio pin(say digital pin 6) logic 1, I want to reset my code automatically. I want reset done by running sketch on its own(i.e. I don't have press RESET button).

I am not using SD card Image.

I am unable to interpret how it should be done.

2

There are 2 best solutions below

0
On BEST ANSWER

Just add the following line to reset the sketch, without the inconvenience of a board reboot:

system("./opt/cln/galileo/galileo_sketch_reset_script.sh");
4
On

I believe you'll be able to reboot your board by calling in your sketch the system command:

system("reboot");

But there might be a better solution for your main goal. Can you explain a bit more what are you trying to accomplish doing this?