Skip to content

Commit 15fd2d1

Browse files
committed
Added the header to the Bridge.ino example
Removed Serial.begin(), there are no serial prints in the sketch.
1 parent c35d4dc commit 15fd2d1

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

libraries/Bridge/examples/Bridge/Bridge.ino

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
2-
// Possible commands are listed here:
3-
//
4-
// "digital/13" -> digitalRead(13)
5-
// "digital/13/1" -> digitalWrite(13, HIGH)
6-
// "analog/2/123" -> analogWrite(2, 123)
7-
// "analog/2" -> analogRead(2)
8-
// "mode/13/input" -> pinMode(13, INPUT)
9-
// "mode/13/output" -> pinMode(13, OUTPUT)
1+
/*
2+
Bridge
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
7+
calls through the browser.
8+
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
23+
24+
created April 2013
25+
by Cristian Maglie
26+
27+
This example code is in the public domain.
28+
29+
*/
1030

1131
#include <Bridge.h>
1232
#include <YunServer.h>
@@ -17,8 +37,6 @@
1737
YunServer server;
1838

1939
void setup() {
20-
Serial.begin(9600);
21-
2240
// Bridge startup
2341
pinMode(13,OUTPUT);
2442
digitalWrite(13, LOW);

0 commit comments

Comments
 (0)