|
1 | 1 | /* |
2 | | - Bridge |
| 2 | + Arduino Yun Bridge example |
3 | 3 | |
4 | | - This example shows how to use the Bridge library to access the digital |
5 | | - and analog pins on the board through REST calls. |
6 | | - It demonstrates how you can create your own API when using REST style |
| 4 | + This example for the Arduino Yun shows how to use the |
| 5 | + Bridge library to access the digital and analog pins |
| 6 | + on the board through REST calls. It demonstrates how |
| 7 | + you can create your own API when using REST style |
7 | 8 | calls through the browser. |
8 | 9 | |
9 | | - Example of possible commands are listed here: |
10 | | -
|
11 | | - "/arduino/digital/13" -> digitalRead(13) |
12 | | - "/arduino/digital/13/1" -> digitalWrite(13, HIGH) |
13 | | - "/arduino/analog/2/123" -> analogWrite(2, 123) |
14 | | - "/arduino/analog/2" -> analogRead(2) |
15 | | - "/arduino/mode/13/input" -> pinMode(13, INPUT) |
16 | | - "/arduino/mode/13/output" -> pinMode(13, OUTPUT) |
17 | | -
|
18 | | - The circuit: |
19 | | - there is no need of a particular circuit, you can connect: |
20 | | - * some analog sensors to the analog inputs |
21 | | - * LEDs to digital or analog outputs |
22 | | - * digital sensors such as buttos to the digital inputs |
| 10 | + Possible commands created in this shetch: |
| 11 | +
|
| 12 | + * "digital/13" -> digitalRead(13) |
| 13 | + * "digital/13/1" -> digitalWrite(13, HIGH) |
| 14 | + * "analog/2/123" -> analogWrite(2, 123) |
| 15 | + * "analog/2" -> analogRead(2) |
| 16 | + * "mode/13/input" -> pinMode(13, INPUT) |
| 17 | + * "mode/13/output" -> pinMode(13, OUTPUT) |
23 | 18 | |
24 | | - created April 2013 |
25 | | - by Cristian Maglie |
| 19 | + http://arduino.cc/en/Tutorial/Bridge |
26 | 20 | |
27 | | - This example code is in the public domain. |
28 | | - |
29 | | - */ |
| 21 | + This example code is part of the public domain |
| 22 | +*/ |
30 | 23 |
|
31 | 24 | #include <Bridge.h> |
32 | 25 | #include <YunServer.h> |
|
0 commit comments