Hi, i wat thinking about using my esp8266 as a remote and mobile temperature sensor.
My intent is to connect my esp to to hotspot of my smartphone (this should not be very difficult) and establish a connection with a socket on a remote server to sent the temperature. I don't understand how to connect to the server socket, can anyone help me with this problem giving me some suggestions?
use WiFiClient. it is a TCP socket wrapper in Arduino
setup a WiFi server on the temperature sensor system, e.g. a HTTP server which would send a web page displaying temperature to a client
a WiFi client running on smartphone connects to the server and requests temperature (web page)
try a web search for ESP8266 Wi-Fi Access point web-server - there are a number of ESP8266 examples which create an access point and run a web server
as an experiment I modified code from 42 bots to implement on a WeMos D1 ESP8266 WiFi Board a WiFi Access Point running a webserver which displays the temperture read from a TMP102 sensor
resultant web page on an Android phone
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.