Using ESP8266 WiFi Module - ESP-01 to give Arduino UNO connection to Wifi

I am trying to use a ESP8266 WiFi Module - ESP-01 (ESP8266 WiFi Module - ESP-01 - Bastelgarage Elektronik Online Shop) in order to give my arduino uno access to wifi (I know this is outdated, but I am working on updating an existing setup from someone else where there are several arduino uno in use and cables + other components are soldered together so they do not want to put in the effort to replace the UNOs).

Now I connected the uno and esp8266 in the following way:
esp8266 RX to arduino UNO RX (0)
esp8266 TX to arduino UNO TX (1)
esp8266 GND to arduino UNO GND
esp8266 3V3 to arduino UNO 3V3
esp8266 EN to arduino UNO 3V3

I created a fritzing of the wiring that looks like this:

when I upload empty setup and loop functions to test it with AT commands, AT returns OK. But AT+CWJAP="ssid", "pass" returns error. AT+CWLAP also returns an error, unless I send AT+CWMODE=1 before (and don't send a message inbetween that returns an error).

I have tried to wire it with TX and RX going to opposites (i.e. TX on 8266 to RX on arduino UNO) then I get the error messages: "avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00" in a loop.

I have also read places that I need to use a logic level shifter but the UNO also has a 3V3 pin is this not what I need? Do I need to change my wiring? Any help is greatly appreciated.

(also I accidentally put this in Arduino UNO R4 category and now cannot remove that, the UNO used is a rev3e)

Click the gray Flag in the lower right corner of your post and ask a Moderator to move it.

Moved as (sort of) requested.

Hello,

This card is not an UNO R3 ... perhaps error.

Bests regards
Jack EU

hey, how come you say this is not an R3? On the back bottom right corner it says UNO SMD Rev3e in small.



I attached images of the front and back but the UNO SMD Rev3e label on the back is so small I could not take a picture that shows it clearly. How can I find out what board this is then?

OK you have a smd processor on the board UNO R3.

Best regards
Jack-EU

the UNO R3 uses 5V logic and the ESP-01 3.3V therefore you should have a potential divider in the UNO Tx output to ESP-01 RX input
here is an example using a Mega to ESP-01

never attempted to use AT commands to the ESP-01 - always loaded project specific code into the device which then communicates over serial with the host microcontroller

Same here - you can do a lot more programming the eps-01 as an interface. I have a multi page web server running on an esp-01 as a user interface communicating via serial with another processor.

Another thing the esp-01 must be disconnected from the serial interface when using the Arduino USB interface. Otherwise they will fight causing errors or damage.

ok thanks for the reply! Do I need to have a voltage divider or could I also use a logic level shifter? I will need to subscribe the arduino uno to a MQTT topic and react to the messages. For this I will then use code to communicate not via AT commands

if you have a digital output from a 5V device to a ESP-01 input use a voltage divider, e.g. Uno Tx to ESP Rx
if it is two way communication, e.g. I2C, you require a bi-directional level shifter