From 12df9f2c839e81cad2cf9797cc932518e5383c7d Mon Sep 17 00:00:00 2001 From: Fede85 Date: Thu, 18 Oct 2012 19:03:25 +0200 Subject: review of typos a and small errors in some examples --- libraries/Ethernet/examples/CosmClient/CosmClient.ino | 8 +++++--- libraries/Ethernet/examples/CosmClientString/CosmClientString.ino | 8 ++++---- .../Ethernet/examples/WebClientRepeating/WebClientRepeating.ino | 7 ++++--- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'libraries/Ethernet') diff --git a/libraries/Ethernet/examples/CosmClient/CosmClient.ino b/libraries/Ethernet/examples/CosmClient/CosmClient.ino index 22815af..ec74278 100644 --- a/libraries/Ethernet/examples/CosmClient/CosmClient.ino +++ b/libraries/Ethernet/examples/CosmClient/CosmClient.ino @@ -49,9 +49,11 @@ EthernetClient client; //IPAddress server(216,52,233,121); // numeric IP for api.cosm.com char server[] = "api.cosm.com"; // name address for cosm API -unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds -boolean lastConnected = false; // state of the connection last time through the main loop -const unsigned long postingInterval = 10*1000; //delay between updates to cosm.com +unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds +boolean lastConnected = false; // state of the connection last time through the main loop +const unsigned long postingInterval = 10L*1000L; // delay between updates to cosm.com + // the "L" is needed to use long type numbers + void setup() { // start serial port: diff --git a/libraries/Ethernet/examples/CosmClientString/CosmClientString.ino b/libraries/Ethernet/examples/CosmClientString/CosmClientString.ino index 05b549b..e619924 100644 --- a/libraries/Ethernet/examples/CosmClientString/CosmClientString.ino +++ b/libraries/Ethernet/examples/CosmClientString/CosmClientString.ino @@ -51,10 +51,10 @@ EthernetClient client; //IPAddress server(216,52,233,121); // numeric IP for api.cosm.com char server[] = "api.cosm.com"; // name address for Cosm API -unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds -boolean lastConnected = false; // state of the connection last time through the main loop -const unsigned long postingInterval = 10*1000; //delay between updates to Cosm.com - +unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds +boolean lastConnected = false; // state of the connection last time through the main loop +const unsigned long postingInterval = 10L*1000L; // delay between updates to Cosm.com + // the "L" is needed to use long type numbers void setup() { // start serial port: Serial.begin(9600); diff --git a/libraries/Ethernet/examples/WebClientRepeating/WebClientRepeating.ino b/libraries/Ethernet/examples/WebClientRepeating/WebClientRepeating.ino index e0f06c4..650f74e 100644 --- a/libraries/Ethernet/examples/WebClientRepeating/WebClientRepeating.ino +++ b/libraries/Ethernet/examples/WebClientRepeating/WebClientRepeating.ino @@ -39,9 +39,10 @@ EthernetClient client; char server[] = "www.arduino.cc"; -unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds -boolean lastConnected = false; // state of the connection last time through the main loop -const unsigned long postingInterval = 60*1000; // delay between updates, in milliseconds +unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds +boolean lastConnected = false; // state of the connection last time through the main loop +const unsigned long postingInterval = 60L*1000L; // delay between updates, in milliseconds + // the "L" is needed to use long type numbers void setup() { // start serial port: -- cgit v1.2.3-18-g5258