I have a HiLetgo Mega 2560 board, with built in WiFi. When I attempt to include the WifiNINA library (by Arduino), I constantly get an error message when I try to compile: error: 'PinStatus' does not name a type
I've tried researching this online, and there's plenty of information - just nothing that seems to work for my board.
No need to see my code - coding isn't the problem. (I code for a living) It's a known issue. I'm just not sure how it relates to the hardware that I'm using.
EDIT: If this is the wrong subforum, please feel free to move the post. I just didn't see another section that fit better.
Is this a variable some how familiar to you ? That is, have you written code which explicitly refers to it or is it something deeply buried in a library ?
The name of the subforum is somewhat misleading. It should (IMHO) be entitled "Installation Issues". Including Troubleshooting in the name is asking for trouble.
No, it isn't something that should be required for use. There are plenty of posts online that suggest that an update is required. Some people have luck, some don't. Upgrade, downgrade... I'm not having luck with either.
It's an error message that doesn't make sense in the context of the basic usage. And by basic, I'm talking about just including the library - not even making any calls to any of its functions.
The exact solution to the issue every time it pops up, seems to be hardware specific.
Are you sure the WifiNINA library is correct for that board?
Some of the newer board platforms use an enum for PinStatus instead of the traditional HIGH and LOW for digitalWrite, as well as for attaching interrupts. The board platform for the Mega likely does not support this, while WifiNINA is mostly used on the newer boards.
Agreed on the "common sense" part. Unless you have the exact board that I'm using, there's no point in undertaking it. As stated - NOT a code problem. If you have the board that I'm using, I'll happily post the code to include the WifiNINA library.
So can you duplicate the problem, with that information? If not, then thanks for your "help".
Edit: I've just taken a look at some of your previous trolls over the past three years or so.
I'll leave you to your enormous sense of entitlement, and duck out of this one now
Look for examples of using an ESP8266 board with an UNO/Mega. What you have is basically a Mega and ESP8266 built onto the same board, using one of the Mega's serial ports for communications between the two (provided you have the onboard DIP switches set correctly).
I think the error means that you are using the wrong WiFi library for your board. There is no "Arduino" with an ATmega2560 and ESP8266. I think you will have to treat the ESP826 as a 'shield'.
This project uses an ESP8266 module connected to an Arduino MEGA 2560 via Serial1. It can probably be adapted to your hardware:
This library allows you to use the Arduino UNO WiFi Rev.2, Arduino NANO 33 IoT, Arduino MKR 1010 and Arduino MKR VIDOR 4000 WiFi capabilities Arduino - WiFiNINA