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?

  • 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 Aug 31 '18 at 7:15
  • 2
    next time your question gets put on hold, please edit the question .... do not post another question – jsotola Aug 31 '18 at 18:17
  • The old question was about rtpmidi, this is more general I think – Rinaldo Jonathan Sep 1 '18 at 5:46
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.

  • 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. – Rinaldo Jonathan Aug 31 '18 at 7:03
  • Anyway, will buying this solve my problem? Afaik it is mega with esp8266 as wifi inside. robotdyn.com/… – Rinaldo Jonathan Aug 31 '18 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 Aug 31 '18 at 7:12
  • Thanks! I gonna buy robotdyn one soon. Seems easy enough. – Rinaldo Jonathan Aug 31 '18 at 7:26
  • after a while : buying robotdyn mega was one of the worst mistake I've ever made. – Rinaldo Jonathan Jul 19 at 5:27

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.