1

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.

Saad Rafey
  • 531
  • 2
  • 6
  • 18

2 Answers2

1

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");
Saad Rafey
  • 531
  • 2
  • 6
  • 18
0

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?

Miguel Sousa
  • 210
  • 2
  • 10