/* Example of using a Stream object to store the message payload Uses SRAM library: https://github.com/ennui2342/arduino-sram but could use any Stream based class such as SD - connects to an MQTT server - publishes "hello world" to the topic "outTopic" - subscribes to the topic "inTopic" */ #include #include #include #include // Update these with values suitable for your network. byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED }; IPAddress ip(172, 16, 0, 100); IPAddress server(172, 16, 0, 2); SRAM sram(4, SRAM_1024); void callback(char* topic, byte* payload, unsigned int length) { sram.seek(1); // do something with the message for(uint8_t i=0; i