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()
}