0

As the title says, is there any easy way to replace WiFi shield with ESP8266, with as little as possible modification to code?

Here is my ESP:

How do I display this properly?

3
  • for the esp-01 in link, use Serial connection and AT firmware with WiFiEsp library. it is the most common option and Internet is full of tutorials
    – Juraj
    Commented Aug 31, 2018 at 7:15
  • 2
    next time your question gets put on hold, please edit the question .... do not post another question
    – jsotola
    Commented Aug 31, 2018 at 18:17
  • The old question was about rtpmidi, this is more general I think Commented Sep 1, 2018 at 5:46

1 Answer 1

1

Consider porting your sketch to esp8266 board like Wemos D1. The API of the ESP8266WiFi library is same as the API of the WiFi library.

To use esp8266 as network adapter, you have two wiring options.

If you have or buy an esp8266 module with SPI pins, you can connect the esp8266 over SPI like the WiFi shield is connected. Then you upload the WiFiSpiESP firmware to esp8266 and you include in your sketch WiFiSpi library instead of WiFi library.

Second option is to connect esp8266 over Serial or SoftwareSerial. The esp8266 should have AT firmware installed. The you can include WiFiEsp library in you sketch and initialize it with the Serial interface of your choice. You can find the WiFiEsp library in Library manager. Most new esp8266 modules have AT firmware installed at default.

There is one more option for Serial connection, if WiFiEsp wouldn't work for you. WiFiLink firmware and library

All mentioned libraries WiFiSpi, WiFiEsp and WiFiLink have the same API as the WiFi library so the rest of the code should work without changes.

8
  • I have wemos d1 uno around, should not be hard to port over. But my thesis already included mega and esp8266... So i tried to avoid them. Commented Aug 31, 2018 at 7:03
  • Anyway, will buying this solve my problem? Afaik it is mega with esp8266 as wifi inside. robotdyn.com/… Commented Aug 31, 2018 at 7:07
  • for Robotdyn Mega + WiFi the Serial option with WiFiEsp library. use dip switch setting for esp8266 on Serial 3 of Mega.
    – Juraj
    Commented Aug 31, 2018 at 7:12
  • Thanks! I gonna buy robotdyn one soon. Seems easy enough. Commented Aug 31, 2018 at 7:26
  • after a while : buying robotdyn mega was one of the worst mistake I've ever made. Commented Jul 19, 2019 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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