Community
cancel
Showing results for 
Search instead for 
Did you mean: 
DLedo
Beginner
1,034 Views

How can I execute a script on Edison memory using the Arduino IDE?

Jump to solution

I need to execute a script saved on Edison memory when an event comes on in my firmware.

I know the locate and name of it ( /folder/script.sh ) but I just don't know how to execute it using the arduino IDE.

Can someone help me with it?

Best regards.

1 Solution
Diego_V_Intel
Employee
66 Views

Hello Ledo,

You can run Linux commands from the Arduino IDE using system calls. The syntax is the following: system("command");

So to execute a script you could use the following line in the Arduino sketch: system("sh /folder/script.sh");

Regards,

Diego.

View solution in original post

2 Replies
Diego_V_Intel
Employee
67 Views

Hello Ledo,

You can run Linux commands from the Arduino IDE using system calls. The syntax is the following: system("command");

So to execute a script you could use the following line in the Arduino sketch: system("sh /folder/script.sh");

Regards,

Diego.

View solution in original post

DLedo
Beginner
66 Views

Diego,

Thanks for your help.

It works with just a little change, just when I wrote system("/folder/script.sh"); without the first sh .

Regards,

Ledo.

Reply