/// I am trying on the Domino to use the ArduinoYun to talk to the Linux, but this just returns continuous nonsense. Anybody have any ideas ?
#include <Process.h>
void setup()
{
digitalWrite(13, HIGH);
// Initialize Bridge
// Bridge.begin();
/// - not for Domino ?
// Initialize Serial
Serial.begin(9600);
// Wait until a Serial Monitor is connected.
while( ! Serial ) {}
digitalWrite(13, LOW);
delay(10000);
runProcess();
}
void loop()
{
Serial.println("> ");
delay(2000);
}
void runProcess()
{
Process p; // Create a process and call it “p”
p.begin(“ls”);
// p.addParameter(“-a”); // Add the parameter
p.run(); // Run the process and wait for its termination
// A process output can be read with the stream methods
while (p.available()>0) {
char c = p.read();
Serial.print(c);
}
// Ensure the last bit of data is sent.
Serial.flush();
}
/// - What is missing to use the runProcess() on the DominoQI ?