Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

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

DLedo
Beginner
1,100 Views

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
132 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
133 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.

DLedo
Beginner
132 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