OTA Upload With ESP8266 and Deviot

by gepd in Circuits > Software

4507 Views, 9 Favorites, 0 Comments

OTA Upload With ESP8266 and Deviot

ota.jpg

In my previous instructable I showed you how to install and use Deviot, a plugin for Sublime Text which use PlatformIO ecosystem, that means you don't need Arduino/Genuino IDE to work with it.

Since version 1.2.0 you can upload your firmware usin OTA (Over The Air) with a simple steps

NOTE: CURRENTLY, YOU CAN USE THIS FEATURE ONLY WITH ESP DEVICES

Basic OTA Sketch

ota1.png

To start using OTA, first you need to upload a firmware to enable it. We will use the BasicOTA example to do that.

It's necessary to change this lines:

const char* ssid = ".........."; // Your wifi name
const char* password = ".........."; // Wifi password

Additionally if you want to protect you device with a password, uncomment and set your password in this line:

ArduinoOTA.setPassword("admin");

Upload Your Code

ota4.png

- Select a Board: Deviot Menu > Select Board and choose you board

Remember this feature is only available in ESP devices (full list with supported devices)

We can't use OTA to upload our code yet, so we have to select a Serial Port:

- Upload you code: Deviot Menu > Upload

You will be prompt to select a serial port, but if you have selected one previously, go to Deviot Menu > Serial Port(s) and select the right one.

You will see the percent of the upload, wait until it's completed

Upload Using OTA

ota3.png
ota2.png

At this point you can start to use OTA. Check your device in Deviot Menu > Serial Port(s) You should see a new device, if you haven't change the host name, it should be called something like: ESP8266-2BFD12.LOCAL, choose it.

Now you can upload your code by OTA. After press Upload will see the progress in the console.

(If you have assigned a protection password, you'll be prompted for it)


Rember you can't remove the basicOTA code if you want to keep using it.

I'm attaching the example "BlinkWithoutDelay" including OTA.
You should change with the number of your led

int led = 2;

If you find any problem please report the issue in the github of the project