diff --git a/libraries/Bridge/examples/Bridge/Bridge.ino b/libraries/Bridge/examples/Bridge/Bridge.ino index ea2ab8473..f7214b0ba 100644 --- a/libraries/Bridge/examples/Bridge/Bridge.ino +++ b/libraries/Bridge/examples/Bridge/Bridge.ino @@ -1,32 +1,25 @@ /* - Bridge + Arduino Yun Bridge example - This example shows how to use the Bridge library to access the digital - and analog pins on the board through REST calls. - It demonstrates how you can create your own API when using REST style + This example for the Arduino Yun shows how to use the + Bridge library to access the digital and analog pins + on the board through REST calls. It demonstrates how + you can create your own API when using REST style calls through the browser. - Example of possible commands are listed here: + Possible commands created in this shetch: - "/arduino/digital/13" -> digitalRead(13) - "/arduino/digital/13/1" -> digitalWrite(13, HIGH) - "/arduino/analog/2/123" -> analogWrite(2, 123) - "/arduino/analog/2" -> analogRead(2) - "/arduino/mode/13/input" -> pinMode(13, INPUT) - "/arduino/mode/13/output" -> pinMode(13, OUTPUT) - - The circuit: - there is no need of a particular circuit, you can connect: - * some analog sensors to the analog inputs - * LEDs to digital or analog outputs - * digital sensors such as buttos to the digital inputs + * "digital/13" -> digitalRead(13) + * "digital/13/1" -> digitalWrite(13, HIGH) + * "analog/2/123" -> analogWrite(2, 123) + * "analog/2" -> analogRead(2) + * "mode/13/input" -> pinMode(13, INPUT) + * "mode/13/output" -> pinMode(13, OUTPUT) - created April 2013 - by Cristian Maglie + http://arduino.cc/en/Tutorial/Bridge - This example code is in the public domain. - - */ + This example code is part of the public domain +*/ #include #include diff --git a/libraries/Bridge/examples/ConsoleAsciiTable/ConsoleAsciiTable.ino b/libraries/Bridge/examples/ConsoleAsciiTable/ConsoleAsciiTable.ino index 4cdf4c1c4..78c07b0ab 100644 --- a/libraries/Bridge/examples/ConsoleAsciiTable/ConsoleAsciiTable.ino +++ b/libraries/Bridge/examples/ConsoleAsciiTable/ConsoleAsciiTable.ino @@ -10,15 +10,16 @@ The circuit: No external hardware needed. created 2006 - by Nicholas Zambetti + by Nicholas Zambetti + http://www.zambetti.com modified 9 Apr 2012 by Tom Igoe modified 22 May 2013 by Cristian Maglie This example code is in the public domain. - - + + http://arduino.cc/en/Tutorial/ConsoleAsciiTable */ diff --git a/libraries/Bridge/examples/ConsolePixel/ConsolePixel.ino b/libraries/Bridge/examples/ConsolePixel/ConsolePixel.ino index c962b6e9a..492681656 100644 --- a/libraries/Bridge/examples/ConsolePixel/ConsolePixel.ino +++ b/libraries/Bridge/examples/ConsolePixel/ConsolePixel.ino @@ -23,6 +23,8 @@ This example code is in the public domain. + http://arduino.cc/en/Tutorial/ConsolePixel + */ #include diff --git a/libraries/Bridge/examples/ConsoleRead/ConsoleRead.ino b/libraries/Bridge/examples/ConsoleRead/ConsoleRead.ino index 0019c2000..1b130e0f9 100644 --- a/libraries/Bridge/examples/ConsoleRead/ConsoleRead.ino +++ b/libraries/Bridge/examples/ConsoleRead/ConsoleRead.ino @@ -16,6 +16,9 @@ by Tom Igoe This example code is in the public domain. + + http://arduino.cc/en/Tutorial/ConsoleRead + */ #include diff --git a/libraries/Bridge/examples/Datalogger/Datalogger.ino b/libraries/Bridge/examples/Datalogger/Datalogger.ino index 2d792a403..219eb94f9 100644 --- a/libraries/Bridge/examples/Datalogger/Datalogger.ino +++ b/libraries/Bridge/examples/Datalogger/Datalogger.ino @@ -25,6 +25,8 @@ by Tom Igoe This example code is in the public domain. + + http://arduino.cc/en/Tutorial/YunDatalogger */ diff --git a/libraries/Bridge/examples/FileWriteScript/FileWriteScript.ino b/libraries/Bridge/examples/FileWriteScript/FileWriteScript.ino index b550db2fe..722c1a5b4 100644 --- a/libraries/Bridge/examples/FileWriteScript/FileWriteScript.ino +++ b/libraries/Bridge/examples/FileWriteScript/FileWriteScript.ino @@ -8,6 +8,8 @@ by Cristian Maglie This example code is in the public domain. + + http://arduino.cc/en/Tutorial/FileWriteScript */ diff --git a/libraries/Bridge/examples/HttpClient/HttpClient.ino b/libraries/Bridge/examples/HttpClient/HttpClient.ino index 4104ef44a..55736f279 100644 --- a/libraries/Bridge/examples/HttpClient/HttpClient.ino +++ b/libraries/Bridge/examples/HttpClient/HttpClient.ino @@ -1,19 +1,47 @@ +/* + + Yun HTTP Client + + This example for the Arduino Yún shows how create a basic + HTTP client that connects to the internet and downloads + content. In this case, you'll connect to the Arduino + website and download a version of the logo as ASCII text. + + created by Tom igoe + May 2013 + + This example code is in the public domain. + + http://arduino.cc/en/Tutorial/HttpClient + +*/ #include #include void setup() { + // Bridge takes about two seconds to start up + // it can be helpful to use the on-board LED + // as an indicator for when it has initialized pinMode(13, OUTPUT); digitalWrite(13, LOW); Bridge.begin(); + digitalWrite(13, HIGH); + Serial.begin(9600); - while(!Serial); + + while(!Serial); // wait for a serial connection } void loop() { + // Initialize the client library HttpClient client; + + // Make a HTTP request: client.get("http://arduino.cc/asciilogo.txt"); + // if there are incoming bytes available + // from the server, read them and print them: while (client.available()) { char c = client.read(); Serial.print(c); diff --git a/libraries/Bridge/examples/Process/Process.ino b/libraries/Bridge/examples/Process/Process.ino index 7646d1525..9496a44d0 100644 --- a/libraries/Bridge/examples/Process/Process.ino +++ b/libraries/Bridge/examples/Process/Process.ino @@ -8,6 +8,8 @@ by Cristian Maglie This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Process */ diff --git a/libraries/Bridge/examples/ShellCommands/ShellCommands.ino b/libraries/Bridge/examples/ShellCommands/ShellCommands.ino index 5a4c291d4..bdf2619ab 100644 --- a/libraries/Bridge/examples/ShellCommands/ShellCommands.ino +++ b/libraries/Bridge/examples/ShellCommands/ShellCommands.ino @@ -17,6 +17,8 @@ This example code is in the public domain. + http://arduino.cc/en/Tutorial/ShellCommands + */ #include diff --git a/libraries/Bridge/examples/TemperatureWebPanel/TemperatureWebPanel.ino b/libraries/Bridge/examples/TemperatureWebPanel/TemperatureWebPanel.ino index 2149737cc..b7e4bd85e 100644 --- a/libraries/Bridge/examples/TemperatureWebPanel/TemperatureWebPanel.ino +++ b/libraries/Bridge/examples/TemperatureWebPanel/TemperatureWebPanel.ino @@ -27,10 +27,12 @@ created 6 July 2013 by Tom Igoe - This example code is in the public domain. - + + http://arduino.cc/en/Tutorial/TemperatureWebPanel + */ + #include #include #include diff --git a/libraries/Bridge/examples/TimeCheck/TimeCheck.ino b/libraries/Bridge/examples/TimeCheck/TimeCheck.ino index 848ff2583..c75cb9406 100644 --- a/libraries/Bridge/examples/TimeCheck/TimeCheck.ino +++ b/libraries/Bridge/examples/TimeCheck/TimeCheck.ino @@ -11,6 +11,8 @@ By Tom Igoe This example code is in the public domain. + + http://arduino.cc/en/Tutorial/TimeCheck */ diff --git a/libraries/Bridge/examples/WiFiStatus/WiFiStatus.ino b/libraries/Bridge/examples/WiFiStatus/WiFiStatus.ino index 5921b7024..781004064 100644 --- a/libraries/Bridge/examples/WiFiStatus/WiFiStatus.ino +++ b/libraries/Bridge/examples/WiFiStatus/WiFiStatus.ino @@ -14,7 +14,10 @@ By Federico Fissore This example code is in the public domain. - */ + + http://arduino.cc/en/Tutorial/YunWiFiStatus + +*/ #include diff --git a/libraries/Bridge/examples/XivelyClient/XivelyClient.ino b/libraries/Bridge/examples/XivelyClient/XivelyClient.ino index 69f979c89..c7741831d 100644 --- a/libraries/Bridge/examples/XivelyClient/XivelyClient.ino +++ b/libraries/Bridge/examples/XivelyClient/XivelyClient.ino @@ -7,9 +7,12 @@ created 15 March 2010 updated 27 May 2013 by Tom Igoe + + http://arduino.cc/en/Tutorial/YunXivelyClient */ + // include all Libraries needed: #include #include "passwords.h" // contains my passwords, see below diff --git a/libraries/Bridge/examples/YunSerialTerminal/YunSerialTerminal.ino b/libraries/Bridge/examples/YunSerialTerminal/YunSerialTerminal.ino index faffd93d3..d2704e80b 100644 --- a/libraries/Bridge/examples/YunSerialTerminal/YunSerialTerminal.ino +++ b/libraries/Bridge/examples/YunSerialTerminal/YunSerialTerminal.ino @@ -27,8 +27,12 @@ modified by Cristian Maglie This example code is in the public domain. + + http://arduino.cc/en/Tutorial/YunSerialTerminal + */ + long lininoBaud = 250000; void setup() { @@ -75,4 +79,4 @@ void loop() { char c = (char)Serial1.read(); // read from Linino Serial.write(c); // write to USB-serial } -} \ No newline at end of file +}