Can I use an ESP-01 to add Wi-Fi to my Arduino UNO? What setup or firmware is required?

Hi everyone,

I’m planning to add Wi-Fi functionality to an Arduino UNO and was wondering whether the ESP-01 module is compatible with it. If it is, can someone guide me through the proper procedure? For example, do I need to flash any firmware onto the ESP-01, or is there a standard method I should follow to get everything working?

Any instructions, suggestions, or helpful resources would be greatly appreciated.

Is there a reason why you don’t want to use an ESP32?

With an ESP32 you would have WiFi on the devboard and could do all you want. There would be no need to use two processors.

The topic title tells readers that you have a working example of NTP access.
It seems then that you need to add, at minimum, serial comm for data exchange between the ESP01 and the UNO - the UNO would request the current time and the ESP would send that back (hh mm).

define compatible...

They don't use the same voltage (5V versus 3.3V) so some voltage adaptor is needed. but then yes it's just two CPUs talking to each other. the ESP-01 can be with an AT firmware and you drive it that way through Serial communication or run espressif OS in which case you can decide how you communicate.

agree with the others, no point having two boards. Just go with an ESP32...

1 Like

An ESP32 is more capable than an UNO, so why not only use an ESP32.

Beware of the bad NTP examples floating on the net.
Most of them date from before the big changes to the ESP core.
If you see time.h and NTP client library then you are looking at outdated code.
Current code needs only one location string in setup.

Tell us more about your project, so we can advise you better how to upgrade.
Leo..

Edit: An example of minimal NTP code.
All it needs is your wifi credentials and timezone (see the weblink in the code).
Does automagic daylightsavings too.
My favorite board for clocks is the XIAO ESP32C3 or the ESP-C3 supermini (the good version).

#include <WiFi.h> // ESP32
unsigned long prevTime;
time_t now; // holds epoch
tm tm; // create time structure

void setup() {
  Serial.begin(115200);
  WiFi.begin("SSID", "PW"); // WiFi credentials
  configTzTime("NZST-12NZDT,M9.5.0,M4.1.0/3", "nz.pool.ntp.org"); // https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
}

void loop() {
  time(&now);
  if (now != prevTime) { // time has changed?
    prevTime = now; // remember
    localtime_r(&now, &tm); // compute local time
    printf("\n%02u:%02u:%02u", tm.tm_hour, tm.tm_min, tm.tm_sec); // print some of the available time elements
  }
}

It seems, from a previous thread, that OP lives in Bangla Desh.
The line in setup would then be
configTzTime("<+06>-6", "bd.pool.ntp.org"); // Dhaka
Leo..

The 2 processors are complicating matters. It can be done, but it is clumsy. What do you need the UNO for ? An ESP-01 has 4 GPIO pins available. If you need more pins or specific peripherals like SPI or I2C then a nodeMCU or even an ESP32 would be better.

If you just want to built on what you have, yes with a voltage divider on the ESP's rx pin and an original UNO powering the ESP you can communicate with the ESP-01 over Serial, and you can either use espressif firmware AT-commands or create your own and overwrite the AT-commands.

The ESP-01 is based on an ESP8266 and is quite a powerful processor, but not all pins are exposed and has no onboard voltage regulator.

We can't give proper advice until we know how which type of display OP is using.
OP also seems to have a NodeMCU 8266, which has more pins exposed, and equally good to make a NTP clock with. Just slightly different code from the ESP32 example I posted.
Leo..

My purpose is more about learning the process. I am aware of it that ESP32 is simplify the projects but I want go though the learning pipeline that I can understand how this setup works. I have a Logic Level Converter that will not a problem

And Display I want to use is 0.96 inch OLED Display

Look at this recent OLED clock thread.
Learning how to not do things serves no purpose.
I don't do difficult.
Good luck.
Leo..

I disagree with the « no purpose » because difficult situations and failures are often the most direct way to learn when you are willing to acknowledge them and understand why they happened.

Working with two MCUs in parallel sharpens this process because it forces you to deal with real-world constraints rather than idealized assumptions.

You need to choose a communication link, define a protocol, observe how synchronization behaves, see how latency fluctuates under varying loads, and realize how reliability depends on details you might not have considered important.

You are pushed to design recovery strategies for partial failures, to decide how each MCU should react when the other stalls, and to understand how resilience comes from architecture rather than chance.

You learn to troubleshoot your own assumptions, to appreciate modular design, and to accept that sometimes the only sensible option is to discard your work and start again.

This kind of exploration builds practical experience that no theory and no warning like « don’t do it, make your life easy » can provide, because real engineering will always confront you with situations that are not easy.

And as far as I’m concerned - I find not easy way more interesting that easy - good for your neurons :)

1 Like

Love the 3 day warranty it has !

For Serial communication between an UNO and an ESP-01 i just use a simple voltage divider on the ESP Rx line, which is simpler and tends to cause less issues and can achieve higher speeds. ( i use UNO Tx -> 1K -> ESP Rx -> 1K -> 1K -> GND )

Well one of the complications is that if you use the UART to communicate between the boards, you have no Debug output. Or you could use swSerial for the ESP, but that can not run at the default baud-rate, so you will need to lower the ESP baud-rate to do that.

Also you will have to make a choice about whether you want to just use the standard AT-command firmware, which will suffice for simple things, or write your own firmware and upload that to the ESP, which will make it a lot easier to create a webserver for instance.

If that is the only peripheral you want to add, you may still get away with just the ESP-01, using sw I2C

The ESP-01 on it's own is more than capable to make a clock with I2C display.
Problem with that board is that you also need a sub-board to power the ESP.
Which you also should use with an Uno.
Uno + Esp-01+ power board + level converter, or a single ESP32-C3.
Cigar box or matchbox size.
Difficult or easy.
You choose.
Leo..

Well yes you do need 3.3v and a significant amount of current (let's say 300mA)

If the UNO is an original, the 3.3v onboard should suffice to power the ESP-01

Well the OP has stated that it is for educational purposes, and you have made your point previously.