Page 1 of 1

Connect to the microcontroller directly from the world. Is this possible?

Posted: Tue Jun 17, 2025 7:50 am
by Troll_99
I have an ESP32 microcontroller that runs a mini web server. It is used to control the barrier. You approach the barrier, connect to it as a WiFi point, log in via IP, and click open. This is very inconvenient, especially if there are many people with access. Is it possible to make access directly from the world?
sketch:

Code: Select all

#include <Arduino.h>
#include <WiFi.h>
#include <WebServer.h>

WebServer server(80);

bool needsOpened = false;
bool realOpened = false;
...
void setup() {
...
  Serial.println("Run web server");

  server.on("/wicket/open", [] {
    needsOpened = true;
    Serial.println("OPEN Barrier");
    redirect("/");
  });
  server.on("/wicket/close", [] {
    needsOpened = false;
    Serial.println("CLOSE Barrier");
    redirect("/");
  });
  server.on("/",  indexPage);

  server.begin();
}

Re: Connect to the microcontroller directly from the world. Is this possible?

Posted: Wed Jun 18, 2025 6:54 am
by Bahrik
In simple terms, yes, it is possible.
You can use a specialized service to access the controller directly from the world via https.
https://device-tunnel.top/