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
// Possible commands are listed here: This example shows how to use the Bridge library to access the digital
// and analog pins on the board through REST calls.
// "digital/13" -> digitalRead(13) It demonstrates how you can create your own API when using REST style
// "digital/13/1" -> digitalWrite(13, HIGH) calls through the browser.
// "analog/2/123" -> analogWrite(2, 123)
// "analog/2" -> analogRead(2) Example of possible commands are listed here:
// "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 <Bridge.h>
#include <YunServer.h> #include <YunServer.h>
@ -17,8 +37,6 @@
YunServer server; YunServer server;
void setup() { void setup() {
Serial.begin(9600);
// Bridge startup // Bridge startup
pinMode(13,OUTPUT); pinMode(13,OUTPUT);
digitalWrite(13, LOW); digitalWrite(13, LOW);