Fixed Process example
This commit is contained in:
parent
b6af611448
commit
3b9ccaa637
|
@ -1,24 +1,25 @@
|
||||||
#include <Process.h>
|
#include <Process.h>
|
||||||
|
|
||||||
void brk() {
|
|
||||||
Bridge.print((char)3);
|
|
||||||
Bridge.find("#");
|
|
||||||
}
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
pinMode(13,OUTPUT);
|
||||||
|
digitalWrite(13,LOW);
|
||||||
|
|
||||||
|
Serial.begin(9600);
|
||||||
Bridge.begin();
|
Bridge.begin();
|
||||||
|
|
||||||
|
digitalWrite(13,HIGH);
|
||||||
|
delay(2000);
|
||||||
|
|
||||||
Process p;
|
Process p;
|
||||||
p.begin("curl");
|
p.begin("curl");
|
||||||
p.addParameter("http://arduino.cc/asciilogo.txt");
|
p.addParameter("http://arduino.cc/asciilogo.txt");
|
||||||
p.run();
|
p.run();
|
||||||
|
|
||||||
String res = "";
|
while (p.available()>0) {
|
||||||
while (p.IO.available()>0) {
|
char c = p.read();
|
||||||
p.IO.read();
|
Serial.print(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue