Merge pull request #3833 from agdl/ifSerialmods

Modified reference to Leonardo only in the examples
This commit is contained in:
Arturo Guadalupi 2015-09-22 15:55:58 +02:00
commit a4576a5c40
57 changed files with 60 additions and 60 deletions

View File

@ -23,7 +23,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// prints title with ending line break

View File

@ -33,7 +33,7 @@ void setup() {
// start serial port at 9600 bps:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
pinMode(2, INPUT); // digital sensor is on digital pin 2

View File

@ -37,7 +37,7 @@ void setup() {
// start serial port at 9600 bps and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -15,7 +15,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -20,7 +20,7 @@ void setup() {
// initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
stringOne = String("stringThree = ");

View File

@ -18,7 +18,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
stringOne = String("Sensor ");

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("\n\nString charAt() and setCharAt():");

View File

@ -18,7 +18,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -19,7 +19,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -16,7 +16,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -19,7 +19,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:

View File

@ -15,7 +15,7 @@ void setup() {
//Start serial
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
//Print length of data to run CRC on.
@ -49,4 +49,4 @@ unsigned long eeprom_crc(void) {
crc = ~crc;
}
return crc;
}
}

View File

@ -24,7 +24,7 @@ void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.print("Read float from EEPROM: ");
@ -65,4 +65,4 @@ void secondTest() {
void loop() {
/* Empty loop */
}
}

View File

@ -26,7 +26,7 @@ void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
float f = 123.456f; //Variable to store in EEPROM.
@ -55,4 +55,4 @@ void setup() {
void loop() {
/* Empty loop */
}
}

View File

@ -16,7 +16,7 @@ void setup() {
// initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
}

View File

@ -33,7 +33,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -46,7 +46,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -32,8 +32,8 @@
#include <Esplora.h>
void setup() {
while (!Serial); // needed for Leonardo-based board like Esplora
Serial.begin(9600);
while (!Serial); // needed for native USB port only
}
void loop() {

View File

@ -48,7 +48,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -44,7 +44,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -35,7 +35,7 @@ void setup() {
Serial.begin(9600);
// this check is only needed on the Leonardo:
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// start the Ethernet connection:

View File

@ -43,7 +43,7 @@ void setup() {
Serial.begin(9600);
// this check is only needed on the Leonardo:
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -43,7 +43,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -43,7 +43,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -37,7 +37,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// start the Ethernet connection:

View File

@ -51,7 +51,7 @@ void setup() {
// start serial port:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// give the ethernet module time to boot up:

View File

@ -36,7 +36,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -41,7 +41,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Starting Arduino web client.");

View File

@ -36,7 +36,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// connection state

View File

@ -37,7 +37,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Make Voice Call");

View File

@ -34,7 +34,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("SMS Messages Receiver");

View File

@ -38,7 +38,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Receive Voice Call");

View File

@ -34,7 +34,7 @@ void setup() {
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("SMS Messages Sender");

View File

@ -38,7 +38,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -29,7 +29,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -29,7 +29,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -26,7 +26,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -27,7 +27,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}

View File

@ -30,7 +30,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
Serial.print("Initializing SD card...");

View File

@ -59,7 +59,7 @@ void setup() {
// print some diagnostic info
Serial.begin(9600);
while (!Serial) {
// wait for serial line to be ready
// wait for serial port to connect. Needed for native USB port only
}
// clear the GLCD screen before starting

View File

@ -50,7 +50,7 @@ void setup() {
// print some diagnostic info
Serial.begin(9600);
while (!Serial) {
// wait for serial monitor to be open
// wait for serial port to connect. Needed for native USB port only
}
// try to access the SD card. If that fails (e.g.

View File

@ -22,7 +22,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -34,7 +34,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -23,7 +23,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -22,7 +22,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -37,7 +37,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -40,7 +40,7 @@ void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -34,7 +34,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -43,7 +43,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -40,7 +40,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield:

View File

@ -34,7 +34,7 @@ void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect. Needed for native USB port only
}
// check for the presence of the shield: