Hi... the thing is this:
I am collecting some data from a sensor and showing it in the console, but I want to send it to a server that is not on my LAN. I am also able to conect to wifi using my phone as an AP, but it is just that, just conected to the wifi.
What I want to do and I don't have any idea how is to be able to send the data I get from the sensor to a data base over the internet conection.
All I know is that I have to make a web client.
Any help or sugestions would be very nice
Web Client ESP32 micropython
Re: Web Client ESP32 micropython
Google is your friend:
See here: https://docs.python.org/3.4/howto/sockets.html
and here: https://docs.python.org/3/library/socket.html
See here: https://docs.python.org/3.4/howto/sockets.html
and here: https://docs.python.org/3/library/socket.html
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: Web Client ESP32 micropython
The solution also also depends on the kind of server you want your data to send to.
* If it's a plain HTTP web server or a REST API, I suggest you use urequests.
* If it's a MQTT broker, use umqtt.
* If it's a Redis database, use micropython-redis or picoredis
* If it's an FTP server, use micropython-ftplib
* If it's a plain HTTP web server or a REST API, I suggest you use urequests.
* If it's a MQTT broker, use umqtt.
* If it's a Redis database, use micropython-redis or picoredis
* If it's an FTP server, use micropython-ftplib
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: Web Client ESP32 micropython
And here's a new online resource, that might help you: Python socket cheatsheet
Re: Web Client ESP32 micropython
Here's another great light weight web client for the ESP32 and it's very easy to use and well documented:
https://github.com/jczic/MicroWebCli
https://github.com/jczic/MicroWebCli