I'm using this tutorial to connect my ESP8266-01 WiFi Module to Arduino UNO with Arduino IDE v. 1.8.13.

Tutorial snippet

It works and the module can connect to my WiFi. However, when I try to upload my code, it says:

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30

What could be the problem, since when I remove the reset pin it uploads the code, but now the WiFi goes down.


Your problem is that there are two ways of wiring your ESP-01 module to the Arduino:

  1. Wired so the PC has access to it and the Arduino is effectively disabled, and
  2. Wired so the Arduino has access to it

You are wired in configuration 1 at the moment whereby the Arduino is effectively turned off and the USB connection goes direct to the ESP-01. When you try and upload code to the Arduino it's the ESP-01 that the computer is talking to, not the Arduino.

You need to wire it in configuration 2. In this configuration the TX/RX pins of the ESP-01 connect to any two pins of the Arduino except pins 0 and 1, and the RESET pin is not connected to anything. Then you can't talk to the ESP-01 through the serial monitor - instead you have to write code for the Arduino that uses SoftwareSerial to communicate for you.

There are many many tutorials online about communicating between the Arduino and the ESP-01.

  • This answers so many questions that I have had. Thanks for explaining in such a clear way. Appreciate it – Ngugi Kariuki Aug 2 '20 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.