mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Updated all comments for while (!Serial) additions to serial-based examples
This commit is contained in:
parent
1d0a5bfa50
commit
6f93d3fc17
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
created 2006
|
created 2006
|
||||||
by Nicholas Zambetti
|
by Nicholas Zambetti
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -22,8 +22,9 @@
|
|||||||
void setup() {
|
void setup() {
|
||||||
//Initialize serial and wait for port to open:
|
//Initialize serial and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
|
}
|
||||||
|
|
||||||
// prints title with ending line break
|
// prints title with ending line break
|
||||||
Serial.println("ASCII Table ~ Character Map");
|
Serial.println("ASCII Table ~ Character Map");
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
Created 26 Sept. 2005
|
Created 26 Sept. 2005
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe and Scott Fitzgerald
|
by Tom Igoe and Scott Fitzgerald
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -37,9 +37,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
pinMode(2, INPUT); // digital sensor is on digital pin 2
|
pinMode(2, INPUT); // digital sensor is on digital pin 2
|
||||||
establishContact(); // send a byte to establish contact until receiver responds
|
establishContact(); // send a byte to establish contact until receiver responds
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
created 18 Dec 2009
|
created 18 Dec 2009
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -41,9 +41,10 @@ void setup() {
|
|||||||
server.begin();
|
server.begin();
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Chat server address:");
|
Serial.print("Chat server address:");
|
||||||
Serial.println(Ethernet.localIP());
|
Serial.println(Ethernet.localIP());
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 12 April 2011
|
created 12 April 2011
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -31,8 +31,9 @@ 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);
|
||||||
// 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
|
||||||
|
}
|
||||||
|
|
||||||
// start the Ethernet connection:
|
// start the Ethernet connection:
|
||||||
if (Ethernet.begin(mac) == 0) {
|
if (Ethernet.begin(mac) == 0) {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 21 May 2011
|
created 21 May 2011
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
Based on ChatServer example by David A. Mellis
|
Based on ChatServer example by David A. Mellis
|
||||||
|
|
||||||
@ -38,8 +38,10 @@ 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);
|
||||||
// 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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// start the Ethernet connection:
|
// start the Ethernet connection:
|
||||||
Serial.println("Trying to get an IP address using DHCP");
|
Serial.println("Trying to get an IP address using DHCP");
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
created 18 Dec 2009
|
created 18 Dec 2009
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe, based on work by Adrian McEwen
|
by Tom Igoe, based on work by Adrian McEwen
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -30,9 +30,10 @@ EthernetClient client;
|
|||||||
void setup() {
|
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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// start the Ethernet connection:
|
// start the Ethernet connection:
|
||||||
if (Ethernet.begin(mac) == 0) {
|
if (Ethernet.begin(mac) == 0) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 15 March 2010
|
created 15 March 2010
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe with input from Usman Haque and Joe Saavedra
|
by Tom Igoe with input from Usman Haque and Joe Saavedra
|
||||||
|
|
||||||
http://arduino.cc/en/Tutorial/PachubeClient
|
http://arduino.cc/en/Tutorial/PachubeClient
|
||||||
@ -55,9 +55,10 @@ const unsigned long postingInterval = 10*1000; //delay between updates to Pachub
|
|||||||
void setup() {
|
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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// start the Ethernet connection:
|
// start the Ethernet connection:
|
||||||
if (Ethernet.begin(mac) == 0) {
|
if (Ethernet.begin(mac) == 0) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 15 March 2010
|
created 15 March 2010
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe with input from Usman Haque and Joe Saavedra
|
by Tom Igoe with input from Usman Haque and Joe Saavedra
|
||||||
|
|
||||||
http://arduino.cc/en/Tutorial/PachubeClientString
|
http://arduino.cc/en/Tutorial/PachubeClientString
|
||||||
@ -57,9 +57,10 @@ const unsigned long postingInterval = 10*1000; //delay between updates to Pachu
|
|||||||
void setup() {
|
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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// give the ethernet module time to boot up:
|
// give the ethernet module time to boot up:
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 14 Sep 2010
|
created 14 Sep 2010
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -41,9 +41,10 @@ void setup() {
|
|||||||
Ethernet.begin(mac, ip);
|
Ethernet.begin(mac, ip);
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// give the Ethernet shield a second to initialize:
|
// give the Ethernet shield a second to initialize:
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 21 May 2011
|
created 21 May 2011
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This code is in the public domain.
|
This code is in the public domain.
|
||||||
@ -54,9 +54,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// attempt a DHCP connection:
|
// attempt a DHCP connection:
|
||||||
Serial.println("Attempting to get an IP address using DHCP:");
|
Serial.println("Attempting to get an IP address using DHCP:");
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
created 4 Sep 2010
|
created 4 Sep 2010
|
||||||
by Michael Margolis
|
by Michael Margolis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This code is in the public domain.
|
This code is in the public domain.
|
||||||
@ -40,9 +40,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// start Ethernet and UDP
|
// start Ethernet and UDP
|
||||||
if (Ethernet.begin(mac) == 0) {
|
if (Ethernet.begin(mac) == 0) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
* Ethernet shield attached to pins 10, 11, 12, 13
|
||||||
|
|
||||||
created 18 Dec 2009
|
created 18 Dec 2009
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -29,9 +29,9 @@ EthernetClient client;
|
|||||||
void setup() {
|
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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
// start the Ethernet connection:
|
// start the Ethernet connection:
|
||||||
if (Ethernet.begin(mac) == 0) {
|
if (Ethernet.begin(mac) == 0) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
created 18 Dec 2009
|
created 18 Dec 2009
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -32,9 +32,10 @@ EthernetServer server(80);
|
|||||||
void setup() {
|
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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// start the Ethernet connection and the server:
|
// start the Ethernet connection and the server:
|
||||||
Ethernet.begin(mac, ip);
|
Ethernet.begin(mac, ip);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
created 28 Mar 2011
|
created 28 Mar 2011
|
||||||
by Limor Fried
|
by Limor Fried
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
*/
|
*/
|
||||||
// include the SD library:
|
// include the SD library:
|
||||||
@ -37,9 +37,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("\nInitializing SD card...");
|
Serial.print("\nInitializing SD card...");
|
||||||
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
** CS - pin 4
|
** CS - pin 4
|
||||||
|
|
||||||
created 24 Nov 2010
|
created 24 Nov 2010
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -32,9 +32,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Initializing SD card...");
|
Serial.print("Initializing SD card...");
|
||||||
// make sure that the default chip select pin is set to
|
// make sure that the default chip select pin is set to
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
created 22 December 2010
|
created 22 December 2010
|
||||||
by Limor Fried
|
by Limor Fried
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -32,9 +32,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Initializing SD card...");
|
Serial.print("Initializing SD card...");
|
||||||
// make sure that the default chip select pin is set to
|
// make sure that the default chip select pin is set to
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
created Nov 2010
|
created Nov 2010
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -25,9 +25,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Initializing SD card...");
|
Serial.print("Initializing SD card...");
|
||||||
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
created Nov 2010
|
created Nov 2010
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -26,9 +26,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Initializing SD card...");
|
Serial.print("Initializing SD card...");
|
||||||
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
created Nov 2010
|
created Nov 2010
|
||||||
by David A. Mellis
|
by David A. Mellis
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
|
|
||||||
This example code is in the public domain.
|
This example code is in the public domain.
|
||||||
@ -25,9 +25,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Initializing SD card...");
|
Serial.print("Initializing SD card...");
|
||||||
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* TX is digital pin 3 (connect to RX of other device)
|
* TX is digital pin 3 (connect to RX of other device)
|
||||||
|
|
||||||
created back in the mists of time
|
created back in the mists of time
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
based on Mikal Hart's example
|
based on Mikal Hart's example
|
||||||
|
|
||||||
@ -24,9 +24,10 @@ void setup()
|
|||||||
{
|
{
|
||||||
// Open serial communications and wait for port to open:
|
// Open serial communications and wait for port to open:
|
||||||
Serial.begin57600;
|
Serial.begin57600;
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
Serial.println("Goodnight moon!");
|
Serial.println("Goodnight moon!");
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* Second serial device's TX attached to digital pin 4, RX to pin 5
|
* Second serial device's TX attached to digital pin 4, RX to pin 5
|
||||||
|
|
||||||
created 18 Apr. 2011
|
created 18 Apr. 2011
|
||||||
modified 2 Apr 2012
|
modified 9 Apr 2012
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
based on Mikal Hart's twoPortRXExample
|
based on Mikal Hart's twoPortRXExample
|
||||||
|
|
||||||
@ -36,9 +36,10 @@ 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);
|
||||||
// this check is only needed on the Leonardo:
|
while (!Serial) {
|
||||||
while (!Serial) ;
|
; // wait for serial port to connect. Needed for Leonardo only
|
||||||
;
|
}
|
||||||
|
|
||||||
|
|
||||||
// Start each software serial port
|
// Start each software serial port
|
||||||
portOne.begin(9600);
|
portOne.begin(9600);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user