Run a .sh script with arduino

Hi there!

I'm just a beginner with arduino. I want to ask, if it is possible for arduino to run a .sh script/file. Why I need it - I want to make something like security with arduino - if a door opens, arduino would run this script "gnome-screensaver-command --activate" and the screensaver activates.

I'd be appreciated for any replies :slight_smile:

First be aware that an Arduino is no PC, not in memory size, not in processor speed and other capabilities.

If you want to run scripts you need to make an interpreter for the commandset you want to support and although that is not impossible on an Arduino it is not easy.
In essence an interpreter reads a string from its inputstream, disect this in command and parameters and executes the command. And then start over again. If you want to add conditional statements like IF or WHILE it becomes more complex still.

A nice reader is - http://www.instructables.com/id/AVRSH-A-Command-Interpreter-Shell-for-ArduinoAVR/

If questions remain don't hesitate to ask

OP wants to tell the PC to run a script, not run the script on the Arduino.

OP: Look at GoBetwino Perhaps you could get some ideas how the communication occurs, and make something work for your system.

I think Gnome is a Linux UI thingie, and GoBetwino is Windows only.

Serial port, a little program made in C listening to it, and then just execute shellcode or similar.

Serial port, a little program made in C listening to it, and then just execute shellcode or similar.

You could probably do the whole thing in the shell script with enough hacking...

;D

I think Gnome is a Linux UI thingie, and GoBetwino is Windows only.

Is there any technical reason why GoBetwino can not be ported to Linux or Mac OSs?