Python script with runShellCommand not working...


So I’ve been trying to get the Yun to do something it’s seemingly designed to do… run Python scripts.

I am trying to trigger the script from the Arduino side using the runShellCommand but nothing happens.

Process p;
p.runShellCommand(“python /mnt/sd/arduino/py/”);

I know nothing happens because I’m watching the Linino via SSH and see nothing printed from my Python script.

However, when I manually run the command from the Linux side the script runs and data flows to the Arduino.

Am I doing something wrong? Any help would be greatly appreciated… this has been boggling my mind for a few days now.

Here’s a simplified version of my Arduino code:

#include <Bridge.h>
#include <Process.h>

char time[2];

void setup() {

while (!Serial);


void loop() {
Process p;
p.runShellCommand(“python /mnt/sd/arduino/py/”);
while (p.running());

Bridge.get(“A”, time, 2);
int seconds = atoi(time);

Try it with the full path to python:

p.runShellCommand("/usr/bin/python /mnt/sd/arduino/py/");


That worked... in a way... I had a typo in my directory that running the script this way pointed out!

Ooops... but problem solved!