Add wider IPAddress support in api

This commit is contained in:
Nick O'Leary
2015-08-27 14:18:16 +01:00
parent c753ecaebe
commit 12a9d89ea2
6 changed files with 98 additions and 46 deletions

View File

@ -16,8 +16,8 @@
// Update these with values suitable for your network.
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
byte server[] = { 172, 16, 0, 2 };
byte ip[] = { 172, 16, 0, 100 };
IPAddress ip(172, 16, 0, 100);
IPAddress server(172, 16, 0, 2);
SRAM sram(4, SRAM_1024);
@ -29,7 +29,7 @@ void callback(char* topic, byte* payload, unsigned int length) {
Serial.write(sram.read());
}
Serial.println();
// Reset position for the next message to be stored
sram.seek(1);
}
@ -47,7 +47,7 @@ void setup()
sram.begin();
sram.seek(1);
Serial.begin(9600);
}
@ -55,4 +55,3 @@ void loop()
{
client.loop();
}