1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-22 08:22:04 +03:00

added serial opening mod for Leonardo in examples

This commit is contained in:
Federico Vanzati
2012-06-06 17:31:14 +02:00
parent 9c63ffb8b7
commit 970dd043ce
11 changed files with 55 additions and 21 deletions

View File

@ -51,8 +51,11 @@ boolean lastConnected = false; // state of the connection last t
const unsigned long postingInterval = 10*1000; //delay between updates to cosm.com
void setup() {
// start serial port:
Serial.begin(9600);
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {