I’ve Googled my fingers off, but I can’t find what I need. I would like some generic and configurable libraries for the ESP8266 module used in the default AT-command mode.
All I find are things pertaining to using the ESP8266 as a stand-alone processor and how to program it.
I have a library from Sparkfun (SparkfunESP8266WiFi.h) and it works so long as you don’t stray from the basic examples. It is really made for the shield and while I have that, I can’t use it that way.
I had to move up to a Mega2560 from a UNO. It worked well on the UNO, but the pins used for software serial on the UNO won’t work that way on the Mega. I breadboarded it and connected the TX/RX to pins 10 and 11 on the Mega which will function as a soft serial port, but the ESP8266 library doesn’t seem to have a way to change where it is expecting to find them.
I edited the .h file and changed the pin numbers and that works, but I don’t want to keep needing to edit the library if I use the shield on a UNO again.
I tried making a copy and renaming it, but that didn’t work at all.
What I would really like is a library for the ESP8266 that allows the input to be configured. Allowing a hardware serial (i.e. Serial1) would be a bonus. It would make it compatible with any version of Arduino board.
In lieu of that, I’d settle for any tips on how to modify the library I have to do that.
Note that the ESP8266 module is a 3.3V device. So power and I/F to the Mega must be handled accordingly. I use Serial1 for comm to the ESP8266 module. I also made an adapter board for the ESP8266 to bring out the connections and provide a reset button and drop the TX line from the Mega to 3.3V. The ESP8266 is powered by a separate 3.3v supply.
Thank you. I will look at that and see if it will do what I want. If you have used it on a Mega on Serial1, it will probably work for me.
I’m currently hacking a ESP8266 shield to use with the different pinouts. It has the power supply and buffers already, but I also have a bare module I might use. I know I will need to provide 3.3v power and level shifting.