ArduinoOTA ATmega WiFi R3 + ESP8266 32Mb

Hi all, need help to get OTA on mega using ArduinoOTA.
Just flashed AT firmware on esp8266, serial monitor returns OK. Burned optiboot on mega too.
I don´t understand what´s next. How can I update sketches on mega from arduino ide?
In ArduinoOTA examples the WiFi101_OTA.ino seemed to me the right starting point but it was impossible compile the code, lot of errors:

In file included from C:\Users\Rosa\Documents\Arduino\libraries\WiFiNINA\src/WiFiStorage.h:23:0,
                 from C:\Users\Rosa\Documents\Arduino\libraries\WiFiNINA\src/WiFi.h:38,
                 from C:\Users\Rosa\Documents\Arduino\libraries\WiFiNINA\src/WiFiNINA.h:23,
                 from C:\Users\Rosa\Documents\Arduino\ARDUINO_OTA_BASE\ARDUINO_OTA_BASE.ino:22:
C:\Users\Rosa\Documents\Arduino\libraries\WiFiNINA\src/utility/wifi_drv.h:293:12: error: 'PinStatus' does not name a type
     static PinStatus digitalRead(uint8_t pin);

Where I must insert my code?
Thank you

GitHub documentation says “ ATmega boards require to flash a modified Optiboot bootloader for flash write operations. Details are below...,”

Is that what you have flashed ?

Can you post the code ?

Never used this stuff - but if you look at “ low power labs” , they sell a board specifically for remote uploading of sketches .

WiFiNINA is not the right library.
for esp8266 with AT fw use WiFiEspAT library.
the example is SerialWiFiOTA

Hi hammy, thank you for your help. I have followed the instructions from ArduinoOTA page where in the mega section it says:

The most common Arduino ATmega board with more than 64 kB of flash memory is Arduino Mega. To use it with ArduinoOTA library, you can't use it directly with the Arduino AVR package, because the package doesn't have the right fuse settings for Mega with Optiboot. You can download my boards definitions and use it to burn the modified Optiboot and to upload sketches to your Mega over USB and over network.

Thank you Juraj, I´ll try to understand how to use it.

This basically indicates that the library that you're using is not for the board that you're using. PinStatus is used by some boards that are based on the 4809 processor (Nano Every and Uno WiFi rev2).

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the IDE 1.x category.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.