mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Fixed Process example
This commit is contained in:
parent
05b0fc5f0b
commit
ef9070e85c
@ -1,24 +1,25 @@
|
||||
#include <Process.h>
|
||||
|
||||
void brk() {
|
||||
Bridge.print((char)3);
|
||||
Bridge.find("#");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
pinMode(13,OUTPUT);
|
||||
digitalWrite(13,LOW);
|
||||
|
||||
Serial.begin(9600);
|
||||
Bridge.begin();
|
||||
|
||||
digitalWrite(13,HIGH);
|
||||
delay(2000);
|
||||
|
||||
Process p;
|
||||
p.begin("curl");
|
||||
p.addParameter("http://arduino.cc/asciilogo.txt");
|
||||
p.run();
|
||||
|
||||
String res = "";
|
||||
while (p.IO.available()>0) {
|
||||
p.IO.read();
|
||||
while (p.available()>0) {
|
||||
char c = p.read();
|
||||
Serial.print(c);
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user