0

Arduino Uno Ethernet Shield connect to AIO
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Arduino Uno Ethernet Shield connect to AIO

by Weather411 on Thu Feb 06, 2020 5:23 pm

Hello all,

Been working this problem for several days and after many 'Google' searches, I'm still stumped.

As subject heading suggests, I'm trying to get my Arduino Uno w/ Ethernet Shield (W5500) connected with my Adafruit IO+ account. I have lots of feeds that update with a combination of ESP32 and ESP8266 boards with no problems using the Adafruit IO library.

Note: I built a simple local web server with a DHT22 using the Ethernet shield and it works perfectly.

Adafruit IO v3.4.0
Arduino AVR Boards v1.8.2
Ethernet v2.0.0 (I'm aware that Ethernet2 is now obsolete)

Sketch: example "adafruitio_00_publish"

Within the config.h tab, after I include my IO_USERNAME and IO_KEY, comment out the WIFI and FONA sections but include the Ethernet section (#include "AdafruitIO_Ethernet.h", AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);) I keep getting the same compile error:

Code: Select all | TOGGLE FULL SIZE
virtual void _disconnect() = 0;

                ^~~~~~~~~~~

exit status 1
cannot declare variable 'io' to be of abstract type 'AdafruitIO_Ethernet'


Is this a known bug? Can somebody test and confirm this result (possible fix?)...thank you in advance!
Mike

Weather411
 
Posts: 6
Joined: Fri Sep 15, 2017 7:38 pm

Re: Arduino Uno Ethernet Shield connect to AIO

by brubell on Fri Feb 07, 2020 10:31 am

Could you try it with the Arduino Ethernet library (not adafruit ethernet2)

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

Re: Arduino Uno Ethernet Shield connect to AIO

by Weather411 on Fri Feb 07, 2020 5:46 pm

Hello brubell

The example sketch from Adafruit IO does not include the Ethernet library, only "AdafruitIO_Ethernet.h" .... this is where the problem lies (look at the error code again)

I only mentioned the Ethernet library since I have other projects with my Uno ethernet shield (using the Ethernet library, not Ethernet2) and it works fine. Hardware is good.

I can attempt to re-write the code without using the Adafruit library (to post to AIO) using just the Ethernet library but that will take a lot of time (learning curve).

Weather411
 
Posts: 6
Joined: Fri Sep 15, 2017 7:38 pm

Re: Arduino Uno Ethernet Shield connect to AIO

by brubell on Tue Feb 11, 2020 11:48 am

Weather411 wrote:Hello brubell

The example sketch from Adafruit IO does not include the Ethernet library, only "AdafruitIO_Ethernet.h" .... this is where the problem lies (look at the error code again)

I only mentioned the Ethernet library since I have other projects with my Uno ethernet shield (using the Ethernet library, not Ethernet2) and it works fine. Hardware is good.

I can attempt to re-write the code without using the Adafruit library (to post to AIO) using just the Ethernet library but that will take a lot of time (learning curve).


I'm able to replicate this issue. I added a bug/issue for it on the library and will get to it in the next two weeks: https://github.com/adafruit/Adafruit_IO ... issues/110

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

Re: Arduino Uno Ethernet Shield connect to AIO

by Weather411 on Wed Feb 12, 2020 11:46 am

Great thank you!

Weather411
 
Posts: 6
Joined: Fri Sep 15, 2017 7:38 pm

Please be positive and constructive with your questions and comments.