I bought an ESP8266 and a logic level converter from Sparkfun. I hooked it all up to my Mega using the basic diagram for it at https://www.circuito.io/. I downloaded their ESP8266 library and started playing with code. While it does work (I am able to connect to my wifi, get a list of wifi signals and do a test connect to a website) the library's output is pretty crude. Trying to send a get or post command will likely require a rewrite of the cpp file. I'd rather not reinvent the wheel.
I took a look at the WiFi library and that uses a completely different kind of connection but appears to be much nicer in how it works. I looked for other possible libraries for the esp and there appear to be hundreds.
Does anyone know of a decent library that will work with the logic level converter? What I need is to connect to a wifi, get the list of local wifi signals and send post or get commands to a php file. I have it wired to connect to the Rx an Tx on the Mega.
DrDiettrich:
Most logic level converters don't need a library. Please give a link to your specific converter (data sheet).
Here's the converter:
Here's the wifi:
I guess what I'm looking for is a library that makes all those AT commands easier to handle. For example. using the library on circuito.io site I send a simple command to get a list of all wifi signals it finds. What it spits out is a single huge string that I'm having to parse the hell out of in order to get usable info. Another example, if I tell it to wifi.getHTTP and I use anything other than the domain name (www.mysite.com/test.php) it spits out garbage. Plus, and I dunno if this is even possible with the ESP, https?
I guess what I'm looking for is a library that makes all those AT commands easier to handle. For example. using the library on circuito.io site I send a simple command to get a list of all wifi signals it finds. What it spits out is a single huge string that I'm having to parse the hell out of in order to get usable info. Another example, if I tell it to wifi.getHTTP and I use anything other than the domain name (www.mysite.com/test.php) it spits out garbage. Plus, and I dunno if this is even possible with the ESP, https?
Depending on what you are doing and how many i/o pins you need, you could just run all the code on the ESP module.
It has more memory and is more powerful than the AVR and things get much simpler for many types of IoT stuff if keeping it all on the ESP.
All the AT stuff goes away if running all the code on the ESP.