Skip to content

Commit 0b05660

Browse files
committed
Renamed Cosm examples to Pachube
1 parent 3f5740d commit 0b05660

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

WiFi/examples/WifiCosmClient/WifiCosmClient.ino renamed to WiFi/examples/WifiPachubeClient/WifiPachubeClient.ino

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
Wifi Cosm sensor client
2+
Wifi Pachube sensor client
33
4-
This sketch connects an analog sensor to Cosm (http://www.cosm.com)
4+
This sketch connects an analog sensor to Pachube (http://www.pachube.com)
55
using an Arduino Wifi shield.
66
77
This example is written for a network using WPA encryption. For
88
WEP or WPA, change the Wifi.begin() call accordingly.
99
10-
This example has been updated to use version 2.0 of the Cosm.com API.
10+
This example has been updated to use version 2.0 of the Pachube API.
1111
To make it work, create a feed with a datastream, and give it the ID
1212
sensor1. Or change the code below to match your feed.
1313
@@ -18,14 +18,16 @@
1818
created 13 Mar 2012
1919
modified 14 May 2012
2020
by Tom Igoe
21+
modified 8 Sept 2012
22+
by Scott Fitzgerald
2123
2224
This code is in the public domain.
2325
2426
*/
2527
#include <SPI.h>
2628
#include <WiFi.h>
2729

28-
#define APIKEY "YOUR API KEY GOES HERE" // replace your cosm api key here
30+
#define APIKEY "YOUR API KEY GOES HERE" // replace your pachube api key here
2931
#define FEEDID 00000 // replace your feed ID
3032
#define USERAGENT "My Arduino Project" // user agent is the project name
3133

@@ -38,12 +40,12 @@ int status = WL_IDLE_STATUS;
3840
WiFiClient client;
3941
// if you don't want to use DNS (and reduce your sketch size)
4042
// use the numeric IP instead of the name for the server:
41-
IPAddress server(216,52,233,121); // numeric IP for api.cosm.com
42-
//char server[] = "api.cosm.com"; // name address for cosm API
43+
IPAddress server(216,52,233,121); // numeric IP for api.pachube.com
44+
//char server[] = "api.pachube.com"; // name address for pachube API
4345

4446
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
4547
boolean lastConnected = false; // state of the connection last time through the main loop
46-
const unsigned long postingInterval = 10*1000; //delay between updates to Cosm.com
48+
const unsigned long postingInterval = 10*1000; //delay between updates to pachube.com
4749

4850
void setup() {
4951
// start serial port:
@@ -101,7 +103,7 @@ void sendData(int thisData) {
101103
client.print("PUT /v2/feeds/");
102104
client.print(FEEDID);
103105
client.println(".csv HTTP/1.1");
104-
client.println("Host: api.cosm.com");
106+
client.println("Host: api.pachube.com");
105107
client.print("X-ApiKey: ");
106108
client.println(APIKEY);
107109
client.print("User-Agent: ");

WiFi/examples/WifiCosmClientString/WifiCosmClientString.ino renamed to WiFi/examples/WifiPachubeClientString/WifiPachubeClientString.ino

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
Wifi Cosm sensor client with Strings
2+
Wifi Pachube sensor client with Strings
33
4-
This sketch connects an analog sensor to Cosm (http://www.cosm.com)
4+
This sketch connects an analog sensor to Pachube (http://www.pachube.com)
55
using a Arduino Wifi shield.
66
77
This example is written for a network using WPA encryption. For
88
WEP or WPA, change the Wifi.begin() call accordingly.
99
10-
This example has been updated to use version 2.0 of the cosm.com API.
10+
This example has been updated to use version 2.0 of the pachube.com API.
1111
To make it work, create a feed with a datastream, and give it the ID
1212
sensor1. Or change the code below to match your feed.
1313
@@ -21,6 +21,8 @@
2121
created 16 Mar 2012
2222
modified 14 May 2012
2323
by Tom Igoe
24+
modified 8 Sept 2012
25+
by Scott Fitzgerald
2426
2527
This code is in the public domain.
2628
@@ -43,12 +45,12 @@ WiFiClient client;
4345

4446
// if you don't want to use DNS (and reduce your sketch size)
4547
// use the numeric IP instead of the name for the server:
46-
//IPAddress server(216,52,233,121); // numeric IP for api.cosm.com
47-
char server[] = "api.cosm.com"; // name address for pachube API
48+
//IPAddress server(216,52,233,121); // numeric IP for api.pachube.com
49+
char server[] = "api.pachube.com"; // name address for pachube API
4850

4951
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
5052
boolean lastConnected = false; // state of the connection last time through the main loop
51-
const unsigned long postingInterval = 10*1000; //delay between updates to cosm.com
53+
const unsigned long postingInterval = 10*1000; //delay between updates to pachube.com
5254

5355
void setup() {
5456
// start serial port:
@@ -115,7 +117,7 @@ void sendData(String thisData) {
115117
client.print("PUT /v2/feeds/");
116118
client.print(FEEDID);
117119
client.println(".csv HTTP/1.1");
118-
client.println("Host: api.cosm.com");
120+
client.println("Host: api.pachube.com");
119121
client.print("X-ApiKey: ");
120122
client.println(APIKEY);
121123
client.print("User-Agent: ");

0 commit comments

Comments
 (0)