Skip to content

Commit

Permalink
fixed header file
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjorgensen committed Nov 18, 2011
1 parent af2229c commit e79d7ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Pubsubio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,4 @@ void Pubsubio::send(String body) {
_client.print(0x000000, BYTE);
_client.print(body);
_client.print(0xFFFFFD, BYTE);
}nt(0xFFFFFD, BYTE);
}
}
1 change: 0 additions & 1 deletion Pubsubio.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ class Pubsubio
int parseInt(String text);
};

#endif
#endif
10 changes: 4 additions & 6 deletions examples/pubsub/pubsub.pde
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

unsigned long last = millis();
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,0,10 };
byte ip[] = { 10, 0, 0, 1 };
byte hub[] = { 79, 125, 4, 43 }; // hub.pubsub.io

// instanciate a client to hub.pubsub.io
Pubsubio pubsub;
Pubsubio pubsub(hub);

void setup() {
Serial.begin(9600);
Ethernet.begin(mac, ip);
delay(1000);

pubsub.connect("arduino");

pubsub.subscribe("{\"hello\":\"world\"}",hello);
pubsub.subscribe("{\"hello\":\"world\"}", hello);
}

void loop() {
Expand All @@ -29,6 +28,5 @@ void loop() {
}

void hello(String data) {
Serial.print("english: ");
Serial.println(data);
}

0 comments on commit e79d7ba

Please sign in to comment.