I copied over the 4 files into the PubSubClient library folder (overwriting the 2 original files) and started changing my code.
It won't compile now though, get teh following messages:
MQTT.cpp.o:In function `MQTT::Connect::Connect(String)'
MQTT.cpp*:(.text+0x758): undefined reference to `strnlen_P(char const*, unsigned int)'
MQTT.cpp*:(.text+0x79b): undefined reference to `strnlen_P(char const*, unsigned int)'
MQTT.cpp.o:In function `MQTT::ConnectAck::ConnectAck(unsigned char*, unsigned char)'
MQTT.cpp*:(.text+0x7c4): undefined reference to `memcpy_P(void*, void const*, unsigned int)'
MQTT.cpp.o:In function `MQTT::Publish::Publish(String, String)'
MQTT.cpp*:(.text+0x7ed): undefined reference to `memcpy_P(void*, void const*, unsigned int)'
collect2.exe*:error: ld returned 1 exit status
Error creating .elf
Anyone know what I'm doing wrong? Sorry, I'm being a bit of a cut n paste programmer as don't know C etc!
Cheers!
Ah ha! now compiles!
changed:
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
to
#include <ESP8266WiFi.h>
#include <PubSubClient.h>