I am trying to collect data from various sensors (Thermocouples, flow sensor, etc) and access it remotely. All the things I can find online seem to be for collecting data while being connected to the same network or requiring a dedicated server/ cloud platform to send the data to. But I was wondering if it is possible to directly connect to the micro controller remotely through a different wifi network and get the data.
I’m not at all sure that I understand what you are trying to do from what you posted. However, I have a data collecting project running on an ESP32. The ESP32 contains a web server for downloading the collected data. There’s no WiFi network in the location. The ESP32 creates a WiFi hotspot. Then any device with WiFi and a browser can connect to the ESP32’s hotspot and use the browser to access the data
how far do you need to transmit the data?
how much data/second?
what is the environment? e.g. inside a building, urban, trees, hills, etc
provide more information about the project
Sorry I don't know all the correct terminology. But I want to connect to the micro controller through the internet (like connecting with a computer with an internet connection that is in a completely different location and different network) and access data from the controller, but what I understand this is not possible unless you vpn in to the network, make some port forwarding thing on the router to the micro controller, or have some cloud server using something like MQTT.
Assuming the code running on your microcontroller has a server of some type (e.g. web server, or plain old TCP/IP server). Then you’d need to know the external IP address for the network it’s connected to, and edit the router settings for that network to forward incoming connection requests to the private IP address of your microcontroller.