Install The Library
You could find OTAdrive library on library manager and add it to your project.
- Go to Tools > Manage Libraries then enter
otadrive
in the search box. - Click install or update to the latest version
Library Refrence
You can find library document refrence here.
Find the bin file
The file location of the program (.bin) file is different in v1 and v2 of Arduino IDE.
Arduino IDE v2+
In the Arduino IDE > 2 go to Sketch > Export Compiled Binary or just press Alt+Ctrl+S
.
The compiler will export all binary and result files (such as Partition, Bootloader, etc.) in the same directory your sketch is in. The main firmware file (for OTA) is named the same as the sketch with the (.bin) extension. You can also find the file by checking its size. It should be the same as the compiler reports.
Arduino IDE v1
In the legacy versions of the Arduino IDE, the output directory is dynamic and doesn't have a fixed location in Windows, MAC, and Linux.
First, you should enable compiler output to see what directory compiler is working in the background.
Then you can search for the (.bin) or (.elf) file to find the output directory.