1

I have a pretty simple project, where some data has to be read from a mySQL server. My idea is to do this with an ESP8266, and then provide that data to the Arduino Mega.

Is this possible or am I going to have to use the ESP8266 itself? I highly doubt that I would have enough pins then.

I read something about AT-commands. But I have no idea how to send those commands to the ESP.

Thanks in advance,

Michidez

1

Yes its possible, you can use the ESP8266 as a dumb Wifi to Serial convertor. Set you Arduino IDE up so you can program the ESP8266 like an Arduino, and then write a simple program to connect to the WIFI network and read the data from the server, then just print it to the default serial console with a special sequence of characters at the beginning of each line, like 'DATA'.

Connect the serial port on the ESP8266 to the Mega, don't forget top cross the RX and TX wires and then write a program on the mega that reads from the serial port you have allocated and only process lines beginning with the special sequence of characters.

Yes you could use the AT commands, but that involves a fair amount of learning. pain and different software, when you already probably have the knowledge that you need.

Some of the later version of the ESP8226 can run at 160MHz and have 1MByte or memory so you might want to hand off some of the data crunching to the ESP. (But that's a decision for later, once its working).

Hope that helps.

2

Check out ESP-LINK You can find it here ESP-LINK is a esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer. It has several configuration, one of them allowes uploading new firware ower wifi, or to act as a serial link just like if usb cable is pluged in and serialport viewer is active. The website has great documentation and has one of the slickest configuration interfaces seen on ESP.

  • Could you expand out your answer a bit please? Perhaps a brief description of what we find if we visit the link (I've already done that). Plus describe the gist of what it is about. Stack Exchange frowns on link-only answers. If the link ever goes down the answer becomes useless. – Nick Gammon May 4 '16 at 20:53
  • Updated the answer with more info – NccWarp9 May 8 '16 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.