I have some general questions about the ESP and how it can be used (or not)…
(hopefully someone can/will answer)
Use ESP8266 01 as a ‘wi-fi’ connection… paired with an Arduino Pro-Micro.
- Yes, I know you can use the ESP module standalone… but in this case, the Pro-Micro is needed so I use it as a HID device connected to a PC…
more or less,…
I want to HOST a webpage on the ESP module with a few links (maybe 10 ‘links’).
that when clicked, send a url/query param back to the ESP … this parameter will then be echo’d/mirror’d out via serial to the connected pro-micro…
Pro-Micro parses this ‘parameter’ (serial data) as send an HID command to the PC…
(seems simple enough in theory… but I dont have much exposure to the ESP modules yet)
I’m guessing I’ll need ‘2’ skecthes.
1 x for the ESP module to host the webpage, and send out the $_GET/$_POST data from the response via serial to the connect Arduino
1 x for the Arduino to listen/parse this serial data and send out the matching HID action to the connected PC.
Is there any flaws in the approach I intend to take above?
Moving on… I have some questions about the usage/set-up of the ESP module.
Have the ESP host the webpage itself… (I dont want to make an HTML file hosted on my domain… that reaches out to the ESP via IP address/port fowarding…etc…etc… I want the page itself to be hosted on the ESP)
- I have read and saw mention of this in other posts/articles… I need to use/flash the ESP module with nodeMCU? ← is this correct?
So the ESP module needs to be set up as ‘webserver’ (correct?)…
- this is where I’m getting a bit confused.
If I set it up as a webserver… do I assign it an IP address?
From a quick look at some random sketches/code posted… I see people are connecting to an existing network? (via SSID/PASSWORD)… is this needed? Can a device (cell phone for example) just connect directly to the ESP module? Or does it -NEED- to connect to an existing network?
(I’m not quite clear how the ESP works in this respect to getting an IP address…and connecting to it directly)
Client vs Server vs Both vs Access Point…etc
- anyone chime in and clear this up for me!?
If I -do- need to connect to an existing network… how will I know the IP address of the device once connected?
ie: I build the device at home… test… works… I bring it to work… update the SSID/password to connect to that wi-fi network… how can I get the IP address of the ESP device then? (will it just show up in my cell phone when searching for new available wi-fi networks??)
I’ll stop here, as there is already a handful or questions…
I have read things here & there… but want to get some feedback to eliminate doubt and for clarification!