I've been doing some things with the Arduino UNO lately and I've already completed some simple projects. At this moment I would like to be able to send and receive some data on my WiFi network and in the future to an MQTT server.
From what I've been researching, people use the ESP8266 a lot with a serial-WiFi bridge.
My question is what is the best ESP for me to use with the Arduino UNO?
What is the best or most used library for the ESP family?
It is a simple application in which I only have some digital inputs and outputs, with an analog input and transmit these values via WiFi to perhaps an MQTT broker
With the UNO ESP-01 combination the application is split across two processors and you need a communication protocol between them. This leads to unnecessary extra work than if you have one processor.
There are other boards than the ESP-01 that bring out more of the I/O pins. For example
how many pins do you require - have a look at ESP32 pins
having to implement code on two microcontrollers (a UNO and ESP-01) with associated communications protocol makes the task an order of magnitude harder
I agree about not using 2 boards, doing so adds to the complication of your project. By all means use a second board once you understand the ESP8266 and how to implement communication with another board, but don't try to do so from the start.
what are the attached devices and their logic levels?
the UNO uses 5V logic the ESP32 3.3V logic
you have to be careful connecting 5V logic devices to an ESP32 either use a potential divider for simple logic input or a bi-directional level shifter, e.g. for I2C
Why don't you buy a $2.50 Wemos D1 mini, and try for yourself. It's not that hard to upgrade to an ESP8266. Then upgrade to ESP32 (if you need more I/O).
Leo..
In general it is fairly simple to move code to the ESP series. Some problem areas...
Some libraries that use direct port I/O.
Long loops - the ESP will time out if the WDT is not regularly reset. Calling functions or normal loop control will reset it, so it is normally not a problem.
Bad pointers and accessing outside an array are likely to give an exception rather than just hanging or randomly causing errors. I think this is a plus because the exception decoder can give you a clue to the error.
ESP32 watchdogs are useful if for some reason the code gets stuck in a loop e.g. a faulty sensor not responding to a request in a polling loop (recommend avoid polling loops - use none-blocking IO) - the WDT resets the ESP32 and action can be taken to raise alerts etc
also remember the general recommendation of keeping interrupt and callback routines short - do not call complex IO functions (e.g. LCD IO) in such routines