Added the header to the Bridge.ino example

Removed Serial.begin(), there are no serial prints in the sketch.
This commit is contained in:
Fede85 2013-09-09 13:37:40 +02:00
parent c35d4dc131
commit 15fd2d1158
1 changed files with 28 additions and 10 deletions

View File

@ -1,12 +1,32 @@
/*
Bridge
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
calls through the browser.
Example of possible commands are listed here:
// Possible commands are listed here:
//
// "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)
"/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
created April 2013
by Cristian Maglie
This example code is in the public domain.
*/
#include <Bridge.h>
#include <YunServer.h>
@ -17,8 +37,6 @@
YunServer server;
void setup() {
Serial.begin(9600);
// Bridge startup
pinMode(13,OUTPUT);
digitalWrite(13, LOW);