1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-11 22:24:13 +01:00
Arduino/hardware/arduino/avr/libraries/Bridge/examples/ShellCommands/ShellCommands.ino
Federico Fissore 211efd9ce0 wifi examples renamed OLD*, introducing new comprehensive WiFiStatus example
reviewed ShellCommands example to be not wifi related
2013-06-18 16:42:24 +02:00

27 lines
495 B
C++

/* Demonstrate shell commands */
#include <Process.h>
void setup() {
Bridge.begin();
Console.begin();
Console.buffer(64);
}
void loop() {
Process p;
// This command line prints the name of the wireless that the board is connected to or that the board has created
p.runShellCommand(F("lua /usr/lib/lua/pretty_wifi_info.lua | grep SSID"));
// Read command output
while (p.available()) {
char c = p.read();
Console.print(c);
}
Console.flush();
delay(5000);
}