File tree Expand file tree Collapse file tree 11 files changed +33
-11
lines changed Expand file tree Collapse file tree 11 files changed +33
-11
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ void setup() {
41
41
server.begin ();
42
42
// Open serial communications and wait for port to open:
43
43
Serial.begin (9600 );
44
- while (!Serial) ;
44
+ // this check is only needed on the Leonardo:
45
+ while (!Serial) ;
46
+ ;
45
47
46
48
Serial.print (" Chat server address:" );
47
49
Serial.println (Ethernet.localIP ());
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ EthernetClient client;
30
30
void setup () {
31
31
// Open serial communications and wait for port to open:
32
32
Serial.begin (9600 );
33
- while (!Serial) ;
33
+ // this check is only needed on the Leonardo:
34
+ while (!Serial) ;
35
+ ;
34
36
35
37
// start the Ethernet connection:
36
38
if (Ethernet.begin (mac) == 0 ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ boolean gotAMessage = false; // whether or not you got a message from the client
37
37
void setup () {
38
38
// Open serial communications and wait for port to open:
39
39
Serial.begin (9600 );
40
- while (!Serial) ;
40
+ // this check is only needed on the Leonardo:
41
+ while (!Serial) ;
42
+ ;
41
43
42
44
// start the Ethernet connection:
43
45
Serial.println (" Trying to get an IP address using DHCP" );
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ EthernetClient client;
30
30
void setup () {
31
31
// Open serial communications and wait for port to open:
32
32
Serial.begin (9600 );
33
- while (!Serial) ;
33
+ // this check is only needed on the Leonardo:
34
+ while (!Serial) ;
35
+ ;
34
36
35
37
// start the Ethernet connection:
36
38
if (Ethernet.begin (mac) == 0 ) {
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ const unsigned long postingInterval = 10*1000; //delay between updates to Pachub
55
55
void setup () {
56
56
// Open serial communications and wait for port to open:
57
57
Serial.begin (9600 );
58
- while (!Serial) ;
58
+ // this check is only needed on the Leonardo:
59
+ while (!Serial) ;
60
+ ;
59
61
60
62
// start the Ethernet connection:
61
63
if (Ethernet.begin (mac) == 0 ) {
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ const unsigned long postingInterval = 10*1000; //delay between updates to Pachu
57
57
void setup () {
58
58
// Open serial communications and wait for port to open:
59
59
Serial.begin (9600 );
60
- while (!Serial) ;
60
+ // this check is only needed on the Leonardo:
61
+ while (!Serial) ;
62
+ ;
61
63
62
64
// give the ethernet module time to boot up:
63
65
delay (1000 );
Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ void setup() {
41
41
Ethernet.begin (mac, ip);
42
42
// Open serial communications and wait for port to open:
43
43
Serial.begin (9600 );
44
- while (!Serial) ;
44
+ // this check is only needed on the Leonardo:
45
+ while (!Serial) ;
46
+ ;
45
47
46
48
// give the Ethernet shield a second to initialize:
47
49
delay (1000 );
Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ void setup() {
54
54
55
55
// Open serial communications and wait for port to open:
56
56
Serial.begin (9600 );
57
- while (!Serial) ;
57
+ // this check is only needed on the Leonardo:
58
+ while (!Serial) ;
59
+ ;
58
60
59
61
// attempt a DHCP connection:
60
62
Serial.println (" Attempting to get an IP address using DHCP:" );
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ void setup()
40
40
{
41
41
// Open serial communications and wait for port to open:
42
42
Serial.begin (9600 );
43
- while (!Serial) ;
43
+ // this check is only needed on the Leonardo:
44
+ while (!Serial) ;
45
+ ;
44
46
45
47
// start Ethernet and UDP
46
48
if (Ethernet.begin (mac) == 0 ) {
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ EthernetClient client;
29
29
void setup () {
30
30
// Open serial communications and wait for port to open:
31
31
Serial.begin (9600 );
32
- while (!Serial) ;
32
+ // this check is only needed on the Leonardo:
33
+ while (!Serial) ;
34
+ ;
33
35
34
36
// start the Ethernet connection:
35
37
if (Ethernet.begin (mac) == 0 ) {
You can’t perform that action at this time.
0 commit comments