Skip to content

Commit 7b25e85

Browse files
committed
Updated XivelyClient to use Serial instead of Console
1 parent 7fae00b commit 7b25e85

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ test-bin
2626
.idea
2727

2828
hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/passwords.h
29+
30+
hardware/arduino/avr/libraries/Bridge/examples/.DS_Store

hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/XivelyClient.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ String dataString = "";
3333
void setup() {
3434
// start serial port:
3535
Bridge.begin();
36-
Console.begin();
36+
Serial.begin(9600);
3737

38-
while(!Console); // wait for Network Console to open
39-
Console.println("Xively client");
38+
while(!Serial); // wait for Network Serial to open
39+
Serial.println("Xively client");
4040

4141
// Do a first update immediately
4242
updateData();
@@ -83,7 +83,7 @@ void sendData() {
8383
// sendData function finishes the resources are immediately
8484
// released. Declaring it global works too, BTW.
8585
Process xively;
86-
Console.print("\n\nSending data... ");
86+
Serial.print("\n\nSending data... ");
8787
xively.begin("curl");
8888
xively.addParameter("-k");
8989
xively.addParameter("--request");
@@ -94,13 +94,13 @@ void sendData() {
9494
xively.addParameter(apiString);
9595
xively.addParameter(url);
9696
xively.run();
97-
Console.println("done!");
97+
Serial.println("done!");
9898

9999
// If there's incoming data from the net connection,
100-
// send it out the Console:
100+
// send it out the Serial:
101101
while (xively.available()>0) {
102102
char c = xively.read();
103-
Console.write(c);
103+
Serial.write(c);
104104
}
105105

106106
}

0 commit comments

Comments
 (0)