AdafruitIO Wifi does not name a type error (line52)

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.
Locked
User avatar
WatsonGill
 
Posts: 24
Joined: Wed Dec 22, 2021 1:21 pm

AdafruitIO Wifi does not name a type error (line52)

Post by WatsonGill »

Hi
Completely new to IO.
I have a Surface pro Win 10 pro v1809 running the Arduino IDE v 1.8.19. I have loaded the included example 'AdafruitIO_00_publish' There are no devices (Boards or shields) connected to the PC, except the mouse.

When I compile the sketch I get the following error.
In config.h, at Line 52-
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
I get
Exit status 1
'AdafruitIO_Wifi' does not name a type.

All of the example config.h sketches seem to use the same code, so trying another example didn't make a difference.
Help please.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: AdafruitIO Wifi does not name a type error (line52)

Post by adafruit_support_bill »

There are no devices (Boards or shields) connected to the PC, except the mouse.
But you need to tell the compiler which processor it is compiling it for. Not all boards are supported by that library. Make sure that you select a supported board.
https://learn.adafruit.com/welcome-to-a ... e-hardware

User avatar
WatsonGill
 
Posts: 24
Joined: Wed Dec 22, 2021 1:21 pm

Re: AdafruitIO Wifi does not name a type error (line52)

Post by WatsonGill »

Hi
Thanks for responding. Yes, I have told the compiler I am using the Leonardo ETH although the board is not yet connected.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: AdafruitIO Wifi does not name a type error (line52)

Post by adafruit_support_bill »

Try selecting one of the boards mentioned on the "compatible hardware" page:
https://learn.adafruit.com/welcome-to-a ... e-hardware

User avatar
WatsonGill
 
Posts: 24
Joined: Wed Dec 22, 2021 1:21 pm

Re: AdafruitIO Wifi does not name a type error (line52)

Post by WatsonGill »

Sorry, I should have said I'm using the Adafruit Feather HUZZAH with ESP8266 and I've also installed the following libraries
Adafruit ESP8266.
AdafruitIO Arduino
Adafruit MQQT

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: AdafruitIO Wifi does not name a type error (line52)

Post by adafruit_support_bill »

OK. And you have that board selected in Tools->Board?

Please post the full text of the compiler output so we can see which libraries it is loading.

User avatar
WatsonGill
 
Posts: 24
Joined: Wed Dec 22, 2021 1:21 pm

Re: AdafruitIO Wifi does not name a type error (line52)

Post by WatsonGill »

Hi
Ok. That was the problem. Thank you. I had the Leonardo board selected in the IDE.
However, that now gives me another problem though because I need the Leonardo selected for other reasons. Is this really a 'one or the other' situation?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: AdafruitIO Wifi does not name a type error (line52)

Post by adafruit_support_bill »

If you have software targeted for different boards, just select the intended target board before compiling.

Adafruit_IO WiFi will not work on the Leonardo ETH because it is not a WiFi board. If the Ethernet module on the Leonardo is compatible, you may be able to use Adafruit_IO_Ethernet with a few configuration changes.
https://learn.adafruit.com/welcome-to-a ... 2989606-24

User avatar
WatsonGill
 
Posts: 24
Joined: Wed Dec 22, 2021 1:21 pm

Re: AdafruitIO Wifi does not name a type error (line52)

Post by WatsonGill »

Ok. I get it. I need to rethink a bit because I really don't want to move to Ethernet.
Thanks again for your help

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”