0

Adafruit IO Arduino Library Errors on ESP8266
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit IO Arduino Library Errors on ESP8266

by brubell on Thu Apr 11, 2019 11:16 am

If you're seeing these types of errors when you compile a sketch including Adafruit IO Arduino, read on...

Code: Select all | TOGGLE FULL SIZE
Arduino/libraries/Adafruit_IO_Arduino/src/wifi/AdafruitIO_ESP8266.cpp:22:53: error: cannot allocate an object of abstract type 'HttpClient'
_http = new HttpClient(*_client, _host, _http_port);
^

Arduino/libraries/ArduinoHttpClient/src/HttpClient.h:41:7: note: because the following virtual functions are pure within 'HttpClient':
class HttpClient : public Client
^

Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0/cores/esp8266/Client.h:29:21: note: virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0/cores/esp8266/Client.h:37:22: note: virtual bool Client::flush(unsigned int)
virtual bool flush(unsigned int maxWaitMs = 0) = 0;
^
Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0/cores/esp8266/Client.h:38:22: note: virtual bool Client::stop(unsigned int)
virtual bool stop(unsigned int maxWaitMs = 0) = 0;



Firmware 2.5.0 for the ESP8266 breaks compatibility with ArduinoHttpClient, which is used by Adafruit IO Arduino.

As a workaround, you'll need to downgrade the firmware on the ESP8266 from 2.5.0 to 2.4.2. For information on how to do this, follow this guide: https://learn.adafruit.com/adafruit-io- ... our-sketch

brubell
 
Posts: 336
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit IO Arduino Library Errors on ESP8266

by brubell on Thu Apr 11, 2019 11:18 am

UPDATE: It appears that the Arduino ESP8266 board support package version 2.5.1 will revert the changes made to the HTTPClient library functions.

https://github.com/esp8266/Arduino/pull ... 3438b8cc07

This version is not out yet - we will update this thread once we've ensured that it is compatible with the Feather ESP8266 Huzzah running Adafruit IO Arduino.

brubell
 
Posts: 336
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.