AdafruitIO Library Sketch Won't Compile (digital in) (Included error message)

Hello all,

I’m trying to get an AdafruitIO library sketch to compile… just the simple digital in example… I haven’t changed a single bit of code… I’ve also installed all of the latest libraries associated with this example, so I don’t believe any are missing…

I’m getting this error here:

Arduino: 1.8.9 (Windows 10), Board: “Adafruit Feather HUZZAH ESP8266, 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

Build options changed, rebuilding all
C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_ESP8266.cpp: In constructor ‘AdafruitIO_ESP8266::AdafruitIO_ESP8266(const char*, const char*, const char*, const char*)’:

C:\Users\SI R&D\Documents\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);

^

In file included from C:\Users\SI R&D\Documents\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8:0,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO.h:23,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_ESP8266.h:18,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_ESP8266.cpp:14:

C:\Users\SI R&D\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:41:7: note: because the following virtual functions are pure within ‘HttpClient’:

class HttpClient : public Client

^

In file included from C:\Users\SI R&D\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:10:0,

from C:\Users\SI R&D\Documents\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO.h:23,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_ESP8266.h:18,

from C:\Users\SI R&D\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_ESP8266.cpp:14:

C:\Users\SI R&D\AppData\Local\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;

^

C:\Users\SI R&D\AppData\Local\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;

^

C:\Users\SI R&D\AppData\Local\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;

^

exit status 1
Error compiling for board Adafruit Feather HUZZAH ESP8266.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

I have no idea what this means… any help would be greatly appreciated!

error.txt (2.88 KB)

A change was made in ESP8266 core for Arduino version 2.5.0 that broke compatibility with the Adafruit IO Arduino library:

The workaround is to roll back to ESP8266 core for Arduino 2.4.2:

  • (in the Arduino IDE) Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • Scroll down through the packages until you see "esp8266 by ESP8266 Community". Click on it.
  • From the dropdown version menu, select "2.4.2".
  • Click the "Install" button.
  • Wait for installation to finish.
  • Click the "Close" button.

After doing that, the error should no longer occur.