1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Run new astyle formatter against all the examples

This commit is contained in:
Federico Fissore
2013-10-21 09:58:40 +02:00
parent 3c6ee46828
commit b4c68b3dff
259 changed files with 5160 additions and 5217 deletions

View File

@ -3,22 +3,22 @@
Read data coming from bridge using the Console.read() function
and store it in a string.
To see the Console, pick your Yún's name and IP address in the Port menu
then open the Port Monitor. You can also see it by opening a terminal window
and typing:
and typing:
ssh root@ yourYunsName.local 'telnet localhost 6571'
then pressing enter. When prompted for the password, enter it.
created 13 Jun 2013
by Angelo Scialabba
by Angelo Scialabba
modified 16 June 2013
by Tom Igoe
This example code is in the public domain.
http://arduino.cc/en/Tutorial/ConsoleRead
*/
#include <Console.h>
@ -28,13 +28,13 @@ String name;
void setup() {
// Initialize Console and wait for port to open:
Bridge.begin();
Console.begin();
Console.begin();
// Wait for Console port to connect
while (!Console);
while (!Console);
Console.println("Hi, what's your name?");
}
}
void loop() {
if (Console.available() > 0) {
@ -49,7 +49,7 @@ void loop() {
// Ask again for name and clear the old name
Console.println("Hi, what's your name?");
name = ""; // clear the name string
}
}
else { // if the buffer is empty Cosole.read() returns -1
name += c; // append the read char from Console to the name string
}