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

Troll_99
Posts: 2
Joined: Tue Dec 03, 2024 3:15 pm

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

Postby Troll_99 » Tue Jun 17, 2025 7:50 am

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();
}

Bahrik
Posts: 1
Joined: Tue Jun 17, 2025 12:10 pm

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

Postby Bahrik » Wed Jun 18, 2025 6:54 am

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/

Who is online

Users browsing this forum: No registered users and 1 guest