I want to make a device that will read a tank level and behave as an AP to allow a phone to connect so the tank data can be displayed on a webpage on the phone browser.
Available locally and not via the Internet but I can't seem to get my head around these seemingly (to me) conflicting things.
Can someone please point me at some sketches that will do this to get me started figuring it out?
I tried several example files but the SSID never shows up on the phone. There is always an ESP32-xxxxx SSID that I can connect to without a password, but the SSID in the sketch does not show.
I have recently got an ESP32-CAM and it can be set up to link to an existing WiFi network or an as Access Point. Following is the code for the two options.
// set up as an Access Point
Serial.print("Setting AP (Access Point)…");
// Remove the password parameter, if you want the AP (Access Point) to be open
WiFi.softAP(ssid, password);
IPAddress IP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(IP);
Obviously you will need a different SSID and password for the two options.
I think nothing else in the program needs to be changed.
Thanks Robin, I have ordered one of those ESP32-CAMs as well.
Thanks for the code, but it is way too cryptic for me at this stage. I don't have a clue how to glue that all together as a function thing. I have done about 4-hours research before asking here and still getting no closer.
The example sketches I have tried all looked very similar to your code but the SSID never shows up on the phone, just a weird numbered one that requires no password to connect to. But, it is NOT the SSID I have defined in the sketch.
WaitSome:
The example sketches I have tried all looked very similar to your code but the SSID never shows up on the phone, just a weird numbered one that requires no password to connect to. But, it is NOT the SSID I have defined in the sketch.
You need to post the code of the simplest (shortest) example program and tell us in detail what happens when you run it and what you want it to do that is different.
I am by no means an expert with ESP32 or ESP8266 but I had no problem getting the ESP32-CAM cameraWebServer example working. There is a bit more about it here
Thanks Robin, I have a good grasp of wifi, it is the HTML side I am struggling with at the moment. I am trying to understand the send and receive stuff and everything in between. Also using Ajax is adding more confusion and complexity to this tired old brain.
Thanks for that link, it will come in very handy when my ESP32-CAM arrives. That is a "just for interest," toy as I have no direct use for it yet. But the tank level is a "must do," within the next week as a diesel delivery is imminent. The system currently used is to keep filling until the tank feels right with the markings on the outside. I suspect the guy overfills rather than under, but it eats at my Engineer's brain not knowing exactly what we are getting.
Anyway, for now the point is moot as I have a basic working sketch from Rui Santos' website. I will try and work Ajax into that mix today. Thanks for your help.