Tidy up more api and examples

This commit is contained in:
Nick O'Leary
2015-08-28 11:21:52 +01:00
parent 8e7e99cb8d
commit fa5b7f75d1
8 changed files with 696 additions and 511 deletions

View File

@ -26,6 +26,11 @@ PubSubClient client(server, 1883, callback, ethClient);
void setup()
{
Ethernet.begin(mac, ip);
// Note - the default maximum packet size is 128 bytes. If the
// combined length of clientId, username and password exceed this,
// you will need to increase the value of MQTT_MAX_PACKET_SIZE in
// PubSubClient.h
if (client.connect("arduinoClient", "testuser", "testpass")) {
client.publish("outTopic","hello world");
client.subscribe("inTopic");