#tinker #tailor

Easy to use ‘over the air’ OTA (wifi) to program your ESP32

This is an information post mostly for myself – I spent a lot of time trying to program my ESP32 using the OTA functionality of it and some of it is a bit clumsy. I created a board that I will be soldering the chip version of the ESP and this particular board I won’t have any pin outs for it.

programming board
Programming board used if you buy the ESP32 as a WROOM chip for example, and not embedded onto a board.

This is because it’s purpose built and has the components / sensors already broken out. The ESP needs to be initially programmed, which I can use a programmer for before I mount the chip.

Once the chip is mounted, I won’t be able to remove it easily to update or modify my code. So, I knew using OTA would be a necessity.

I searched for some tutorials to start to understand the principles of how it will work and came across these videos which seem to be the best BUT the code differs on them, and it differs to the code in the git hub too!

The chip I will be soldering to my board.

The code and videos

This is the repository for where the code is https://github.com/SensorsIot/ESP32-OTA

Super important!

This needs to be uploaded with your actual code every time or it will lose the ability to be OTA and you will need to plug in your board.

Save this file. Great advice from the video but if you name the file with a ‘0’ in place of the ‘O’ it will come up top of your file list which is really handy.

Note that I used a zero in place of the ‘O’ so the file is listed first.

Then in Arduino, go to the sketch menu and ‘add file’ or I went to the little drop down arrow in the Arduino window to create a new tab. You then can create a new file through this way.

The new file name is OTA.h


Both files of code :

Also check that you have the correct libraries installed.

my code window in visual studio

Upload your code to your board, make sure you have the correct board and port selected.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.