mirror of https://github.com/noisymime/Arduino.git
Merge pull request #3833 from agdl/ifSerialmods
Modified reference to Leonardo only in the examples
This commit is contained in:
commit
a4576a5c40
|
@ -23,7 +23,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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
|
// prints title with ending line break
|
||||||
|
|
|
@ -33,7 +33,7 @@ void setup() {
|
||||||
// start serial port at 9600 bps:
|
// start serial port at 9600 bps:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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
|
pinMode(2, INPUT); // digital sensor is on digital pin 2
|
||||||
|
|
|
@ -37,7 +37,7 @@ void setup() {
|
||||||
// start serial port at 9600 bps and wait for port to open:
|
// start serial port at 9600 bps and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -20,7 +20,7 @@ void setup() {
|
||||||
// initialize serial and wait for port to open:
|
// initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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 = ");
|
stringOne = String("stringThree = ");
|
||||||
|
|
|
@ -18,7 +18,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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 ");
|
stringOne = String("Sensor ");
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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():");
|
Serial.println("\n\nString charAt() and setCharAt():");
|
||||||
|
|
|
@ -18,7 +18,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -19,7 +19,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -19,7 +19,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// send an intro:
|
||||||
|
|
|
@ -15,7 +15,7 @@ void setup() {
|
||||||
//Start serial
|
//Start serial
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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.
|
//Print length of data to run CRC on.
|
||||||
|
|
|
@ -24,7 +24,7 @@ void setup() {
|
||||||
|
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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: ");
|
Serial.print("Read float from EEPROM: ");
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ void setup() {
|
||||||
|
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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.
|
float f = 123.456f; //Variable to store in EEPROM.
|
||||||
|
|
|
@ -16,7 +16,7 @@ void setup() {
|
||||||
// initialize serial and wait for port to open:
|
// initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(57600);
|
Serial.begin(57600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include <Esplora.h>
|
#include <Esplora.h>
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
while (!Serial); // needed for Leonardo-based board like Esplora
|
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
while (!Serial); // needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
|
@ -48,7 +48,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
// this check is only needed on the Leonardo:
|
// this check is only needed on the Leonardo:
|
||||||
while (!Serial) {
|
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:
|
// start the Ethernet connection:
|
||||||
|
|
|
@ -43,7 +43,7 @@ void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
// this check is only needed on the Leonardo:
|
// this check is only needed on the Leonardo:
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// start the Ethernet connection:
|
||||||
|
|
|
@ -51,7 +51,7 @@ void setup() {
|
||||||
// start serial port:
|
// start serial port:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// give the ethernet module time to boot up:
|
||||||
|
|
|
@ -36,7 +36,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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.");
|
Serial.println("Starting Arduino web client.");
|
||||||
|
|
|
@ -36,7 +36,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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
|
// connection state
|
||||||
|
|
|
@ -37,7 +37,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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");
|
Serial.println("Make Voice Call");
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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");
|
Serial.println("SMS Messages Receiver");
|
||||||
|
|
|
@ -38,7 +38,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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");
|
Serial.println("Receive Voice Call");
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setup() {
|
||||||
// initialize serial communications and wait for port to open:
|
// initialize serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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");
|
Serial.println("SMS Messages Sender");
|
||||||
|
|
|
@ -38,7 +38,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
while (!Serial) {
|
||||||
; // wait for serial port to connect. Needed for Leonardo only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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...");
|
Serial.print("Initializing SD card...");
|
||||||
|
|
|
@ -59,7 +59,7 @@ void setup() {
|
||||||
// print some diagnostic info
|
// print some diagnostic info
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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
|
// clear the GLCD screen before starting
|
||||||
|
|
|
@ -50,7 +50,7 @@ void setup() {
|
||||||
// print some diagnostic info
|
// print some diagnostic info
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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.
|
// try to access the SD card. If that fails (e.g.
|
||||||
|
|
|
@ -22,7 +22,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -23,7 +23,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -22,7 +22,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -37,7 +37,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -40,7 +40,7 @@ void setup() {
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -43,7 +43,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -40,7 +40,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial) {
|
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:
|
// check for the presence of the shield:
|
||||||
|
|
Loading…
Reference in New Issue