Arduino: 1.6.8 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"
Build options changed, rebuilding all
/var/folders/0s/sftdlnmx35scwybt6gn15s640000gp/T/arduino_modified_sketch_466625/sketch_may19a.ino: In function 'void onMqttDisconnect(AsyncMqttClientDisconnectReason)':
sketch_may19a:23: error: no matching function for call to 'HardwareSerial::println(AsyncMqttClientDisconnectReason&)'
Serial.println(reason);
^
/var/folders/0s/sftdlnmx35scwybt6gn15s640000gp/T/arduino_modified_sketch_466625/sketch_may19a.ino:23:24: note: candidates are:
In file included from /Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Stream.h:26:0,
from /Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/HardwareSerial.h:31,
from /Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Arduino.h:246,
from sketch/sketch_may19a.ino.cpp:1:
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:79:16: note: size_t Print::println(const __FlashStringHelper*)
size_t println(const __FlashStringHelper *);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:79:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'const __FlashStringHelper*'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:80:16: note: size_t Print::println(const String&)
size_t println(const String &s);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:80:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'const String&'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:81:16: note: size_t Print::println(const char*)
size_t println(const char[]);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:81:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'const char*'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:82:16: note: size_t Print::println(char)
size_t println(char);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:82:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'char'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:83:16: note: size_t Print::println(unsigned char, int)
size_t println(unsigned char, int = DEC);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:83:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'unsigned char'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:84:16: note: size_t Print::println(int, int)
size_t println(int, int = DEC);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:84:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'int'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:85:16: note: size_t Print::println(unsigned int, int)
size_t println(unsigned int, int = DEC);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:85:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'unsigned int'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:86:16: note: size_t Print::println(long int, int)
size_t println(long, int = DEC);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:86:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'long int'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:87:16: note: size_t Print::println(long unsigned int, int)
size_t println(unsigned long, int = DEC);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:87:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'long unsigned int'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:88:16: note: size_t Print::println(double, int)
size_t println(double, int = 2);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:88:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'double'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:89:16: note: size_t Print::println(const Printable&)
size_t println(const Printable&);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:89:16: note: no known conversion for argument 1 from 'AsyncMqttClientDisconnectReason' to 'const Printable&'
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:90:16: note: size_t Print::println()
size_t println(void);
^
/Users/matthewbordignon/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Print.h:90:16: note: candidate expects 0 arguments, 1 provided
exit status 1
no matching function for call to 'HardwareSerial::println(AsyncMqttClientDisconnectReason&)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
void onMqttDisconnect(AsyncMqttClientDisconnectReason reason) {
Serial.print("== Disconnected: ");
// Serial.println(reason); // << --- NOT WORKING
Serial.println("Reconnecting to MQTT...");
mqttClient.connect();
}
Can I also suggest you add the example as a separate file as well when you get time. ie /examples/pubsub_example.ino
Matt.