Reputation: 551
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.
Upvotes: 1
Views: 666
Reputation: 551
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");
Upvotes: 1
Reputation: 210
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?
Upvotes: 0