# Introduction

OTAdrive is a special tool let developers/producers to update and control IoT devices through internet. It lets you to group your devices and choose separate firmware version and configuration for each group. OTAdrive provides an administration panel to you and multiple APIs to your devices. The main API is firmware update API let devices to get newer version of firmware remotely We start out tutorials by describe how to update an ESP32/ESP8266 device through OTAdrive system.
ESP8266 HTTP server

# Quick start

Here you can see the most simple program to enable OTA functionality on ESP32/ESP8266. OTAdrive acts as an OTA HTTP server and it is fully compatible with ESP8266 and ESP32. You can Access full example files here (opens new window).
We recommend using the OTAdrive Arduino C++ library to access all of the OTAdrive features more easily.

#include <Arduino.h>
#include <HTTPUpdate.h>

void update();
void setup()
{
  // put your setup code here, to run once:
  pinMode(2, OUTPUT);
  WiFi.begin("Your SSID", "Your Password");
}

uint32_t updateCounter = 0;

void loop()
{
  // put your main code here, to run repeatedly:
  digitalWrite(2, 1);
  delay(250);
  digitalWrite(2, 0);
  delay(250);

  if (WiFi.status() == WL_CONNECTED)
  {
    updateCounter++;
    if (updateCounter > 20)
    {
      updateCounter = 0;
      update();
    }
  }
}

String getChipId()
{
  String ChipIdHex = String((uint32_t)(ESP.getEfuseMac() >> 32), HEX);
  ChipIdHex += String((uint32_t)ESP.getEfuseMac(), HEX);
  return ChipIdHex;
}

void update()
{
  String url = "http://otadrive.com/deviceapi/update?";
  url += "k=c0af643b-4f90-4905-9807-db8be5164cde";
  url += "&v=1.0.0.1";
  url += "&s=" + getChipId();

  WiFiClient client;
  httpUpdate.update(client, url, "1.0.0.1");
}

# Test it

Please follow this tutorial video to see how you can use OTAdrive minimum features.
This example show you how to use OTAdrive to remote update of ESP32