How to use ESP8266 / ESP-01 with Zero?

I am trying to use ESP-01 (ESP8266) with Arduino Zero.
Works fine with Arduino Uno.
With Zero, i get various compiler errors.
For example:
#include "SoftwareSerial.h"
gives:
....\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:152:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
#error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

Anyone who have a working scetch using ESP-01 to help a newbie?

what do you mean with "Arduino Zero" versus "Zero"?


why would you need SoftwareSerial on the Arduino Zero? You have access to multiple Hardware Serial ports (SERCOM)

Sorry, misspelling. Intended to say that ESP-01 works fine with UNO.

Maybe you are pointing me in the right direction anyway: So how do I use SERCOM with wifi library?

can you post a link to the library you have in mind?


also the UNO is 5V and the Arduino Zero is a 3.3V board. How did you power the ESP-01 and link the Tx and Rx?

1 Like

just use Serial1 on pins RX and TX

1 Like

I finally got wifi to work with ESP_AT_Lib

I previously tried WifiEsp and WifiEspAT (and others), but these did not correctly recognise the initial response from the ESP-01, so (incorrectly) gave the message "WiFi shield not present". I traced the commands and response these libraries used, and it seems that the ESP-01 simply gave responses which the libraries were not prepared for. Maybe because my two ESP-01 modules had old firmware (different versions from 2015-2016).

Anyway, here are some notes for other newbies trying to connect the ESP-01 to Arduino Zero:

  1. Use the library ESP_AT_Lib.
  2. Connect the ESP-01 to the Zeros pin 0 and 1, Tx to Rx and Rx to Tx
  3. The easiest way to make example code to print to Serial Monitor is to include #define Serial SerialUSB
  4. When uploading the scetch from IDE to the Zero, the USB connection will be reset. Due to this anything immedialtely sent to the serial monitor will be lost. To avoid this, include a delay(1000) as first statement in the setup() part (at least if you are using the Arduino IDE for Windows)
  5. ESP-01 may come with different baud rates. 115200 was used on old modules (and are still sold), 9600 on newer, but dont be surprised if you have to use another baud rate such as 19200 (you may change to defined values in between)

Thank you for pointing me in the right direction, and especially thanks to @okvittem

Thx for summing it up

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.