Migration from UNO to ESP8266/ESP32

Hey guys,

About 6 months ago I started using the Arduino Uno, whereas before I only programmed in assembly. I had a lot of help from the people here who helped me and continue to help me a lot. I made some cool projects and the last project I made is an Arduino Uno connected to a Nextion display.

In this last project I use 8 digital inputs, 4 digital outputs, 2 analog inputs, 2 PWM outputs, Tx and Rx.

Now I would like to go a step further and use an ESP8266 or an ESP32, to send some values to the internet and use MQTT to visualize these values.

Firstly, I know that I have to pay attention to the fact that the ESP works at 3.3V and the Arduino at 5V. But I would like to ask and start the topic with the following question.

As this is nothing commercial and the issue of cost has no impact, leaving the Arduino Uno and going to the ESP, which ESP series can best serve me taking into account the number of pins you need to take advantage of my latest project and move to ESP?

The MQTT'ing could be done with either, but I haven't seen any tutorials that fill in all the blanks.
The hosting sites rouse my suspicions, too, to be honest.

How many new threads will it take before you buy a WeMos D1 mini and ESP32 board.
As said in this thread, start playing with the WeMos (8266) and then move up to the ESP32.
Your project will require the ESP32, but judging by your posts you need an intermediate step.
Google "Nextion+ESP32".
Leo..

When I used Nextion with UNO, I just used writing and reading the serial without using any library. I'm going to compare an ESP32, since I saw that the ESP6822 will lack GPIO. But before the ESP32 arrives, I will try to use WoKwi to do my test and see if the ESP32 simulation exists in Proteus.

Never had to use serial on an ESP32, but the ESP32 seems to have three hardware serial ports, so coding that should be easier than an Uno (with SoftwareSerial).
Leo..

In the Arduino IDE, what do I need to install to work with ESP8266 or ESP32?

There is a similar tutorial for the esp32.
So you need two lines there, separated by a comma, one for each ESP type.
Leo..

It does, but accessing all 3 does require some tricks. UART0 is by default connected to GPIO1 & 3, the USB to TTL converter is also connected to those pins (how convenient), but that tends to interfere with RX reception. UART1 is by default connected to GPIO9 & 10 but those pins are also in use by the flash and should not be used. Fortunately you can assign any of the pins to any of the UARTs so yes 3 UARTs are available

An ESP8266 only has 1 analog input, for simplicities sake, get an ESP32, i think you'll need the pins. Counting i think you could just get away with an ESP8266, but it is using all pins (including the 1 extra data pin used to switch between inputs on the ADC.)

It could be done with esp8266. But I/O expander chips would be needed to add more pins, such as ads1015/1115 and pcf8574/8575 or sx1509. So if you have a reason for wanting to stick to esp8266, go for it, but otherwise probably simpler and cheaper to use ESP32.

Is esp8266 really a useful "intermediate step" between Uno and ESP32?
Do definitely consider one of the larger "PCB-like" boards with the built-in USB/Serial converter (like the "WeMos D1") rather than the minimal "bare modules." Such things are available for either ESP8266 or ESP32.
You might be better off buying one of the more supported (and somewhat more expensive) boards (Arduino Nano ESP32, assorted Adafruit, or Sparkfun) vs the "generic" boards...


Do definitely consider one of the larger "PCB-like" boards with the built-in USB/Serial converter

Yes, the dev boards (NodeMCU and the like).
The ESP01 and ESP32 castellated modules are available, but less than ideal for a starter.
"ESP" is expansive. The details are usually let till several posts have gone by and assumptions need to be questioned (i.e. "What exactly are you using??").

Yeah get a Nano ESP32 and find that the libraries don't work. Just a simple dev board (not S2 or S3), and get the 30-pin not the 38-pin (the extra 8 pins actually only expose 1 extra GPIO (0) and the upload works automatically.

In fact, there are many ESP32 options. I'm looking here on Aliexpress. Does anyone recommend a link? I'm afraid of buying something that I won't be able to use

Any ESP32 will work for your project.
Later models have upgraded (or downgraded) features.
Latest models could have more problems with support/software.

Leo..

these But get the ESP-32S. That is the 30-pin. I have both, but i prefer the 30-pin version (black pin headers)
The 38-pin requires me to hold the boot button down during upload, and the extra pins serve (almost) no purpose.

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