Yes, it is possible; however the Arduino sketch always run automatically after the board has booted. Every time you upload a new sketch, it is stored in the /sketch directory and run automatically after you upload it, or after a reboot (if you are using the SD Image).
You could stop the sketch and then re-run it again whenever you want. You can do that from a Python script. The system command that you use in an Arduino sketch can be used in a Python script as well, but you have to import the os library before: import os.
The system command follows the syntax below:
- os.system('Linux command')
If you want to stop the Arduino sketch running in Galileo you should use the following line in your Python script:
- os.system('killall -HUP clloader')
On the other hand, if you want to re-run the Arduino sketch you should use the following line:
- os.system('killall -TERM clloader')
I hope this information is what you are looking for.
Yes, it's what I needed. Thank you very much!