Arduino Uno r3 + ESP8622 + RemoteXY exit status 1

I'm having trouble with uploading my code the arduino, what i want to do is to steer a servo with a slider on the remoteXY app

This is the error message:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x40
Failed uploading: uploading error: exit status 1

Here is my setup, the TX and RX pin are disconnected and on top of the arduino uno is a Rev 3 motor shield which i connected the servo to on OUT5


This is the code:

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266_SOFTSERIAL_POINT
#include <SoftwareSerial.h>


// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX 0
#define REMOTEXY_SERIAL_TX 1
#define REMOTEXY_SERIAL_SPEED 9600
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377


#include <RemoteXY.h>

// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 27 bytes
  { 255,1,0,0,0,20,0,17,0,0,0,31,1,200,84,1,1,1,0,4,
  56,25,87,27,160,2,26 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  int8_t slider_01; // =-100..100 slider position

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#include <Servo.h>  

Servo myservo; 

void setup() 
{
  RemoteXY_Init (); 
  
    myservo.attach(5); 
  RemoteXY.slider_01 = 60; 
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
    int ms = RemoteXY.slider_01*20+500; 
  myservo.writeMicroseconds(ms); 
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay(), use instead RemoteXY_delay() 

}

Hi @ffssfsdgsgdfdfdfhdhb.

I see some wires connected to those pins in your picture, but it doesn't show what is on the other end of the wires. Pins 0 and 1 are used for communication with the computer so connecting anything to those pins can cause the upload to fail with the error messages you shared.

Why did you ground the reset pin?

I was just trying to solve it, i changed it back to 2 and 3. Still doesn't work. The ESP blinks red and blue for like 2 seconds then turns red and after that i wait like a minute to get the same error message

I followed a circuit setup i found on the forum, I added a new circuit specifically made for my setup now. But honestly, i don't know.

@EmilyJane spotted the true cause. Disconnect the reset pin from ground and then try uploading again.

This is done in a case where you want to use the UNO board as a simple USB to serial adapter to the ESP-01 module instead of as an Arduino board. That is done either to send the ESP-01 module AT commands or to upload a sketch to the ESP-01. Grounding the reset pin disables the ATmega328P microcontroller on the UNO board in order to avoid the chance of it interfering with the communication between the ESP8266 microcontroller and the computer.

But your sketch is meant to run on the UNO so you must configure your circuit to allow the computer to communicate with the UNO.

And how do i do that, sorry i'm really new to this.

Omg i'm sorry, didn't see the first part. Thank you

ok so bad and good news. I managed to get the code uploaded, but when trying to connect my phone to the esp8622 wifi there is no wifi called "RemoteXY". The only thing showing up is called like AI_Thinker which is some what linked to the esp when searching it up atleast.

Your circuit seems to have other mistakes as well.

The ESP8266 is a 3.3V device. Feeding it a 5V signal (the Tx of the Uno) can damage the ESP8266 processor; you need a voltage divider between the Tx of the Uno and the Rx of the ESP8266.

You have powered your ESP8266 module with 3.3V. Is that the spec of the module? Or does it require 5V and the module's onboard voltage regulator brings that down to 3.3V? Check the specs of your module.

@ffssfsdgsgdfdfdfhdhb there is a diagram of the circuit you should use in the RemoteXY documentation:

https://remotexy.com/en/help/start/arduino-esp8266-ss/#:~:text=Step%204.%20Connect%20ESP8266%20to%20Arduino%20Uno

I see you also did a silly configuration of the communication interface. If you are going to use pins 0 and 1, then you should select "Hardware Serial" from the "Connection interface" menu in the RemoteXY Editor:

https://remotexy.com/en/help/start/arduino-esp8266-ss/#:~:text=Connection%20interface%3A%20Hardware%20Serial

The documentation explicitly says not to use Software Serial:

https://remotexy.com/en/help/start/arduino-esp8266-ss/#:~:text=you%20need%20to%20use%20Hardware%20Serial%20for%20communication

Note. The ESP8266 is configured with a default baud rate of 115200. For this reason, you need to use Hardware Serial for communication. Software Serial cannot run at this speed.

Did you read the RemoteXY documentation??? If not, do that.

I did see that yesterday and i did change it correctly

The ESP uses 3.3 volt.

Thanks for letting me know.

Alright, so i got the whole rig working thank you so much. I will look into getting a voltage divider for the tx pins so it doesn't damage the esp. I also connected the tx to tx and rx to rx, which is supposed to be flipped around.

I'm having another problem with not being able to center the slider button.
I want this:
image
to this:
image

So i'm having a problem with the RemoteXY gui. I want the servo to be at 60 degrees (middle) and also the servo to be in the middle. Right now there slider is at the right if the servo needs to be at 60 degrees

I need to tell it that i want the servo to start at 60 degrees

Yes.

I think that you have forgotten to draw the 5V, 3.3V and GND connections :wink:

Oh yea i put the rx to GND, woopsi

This should also work then, right?


image