My code is this. Can you tell me what's the wrong in this code.
RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600
#define REMOTEXY_WIFI_SSID "AirTies_Air5650-1"
#define REMOTEXY_WIFI_PASSWORD "kzekih102030"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "4644ff9d2ef7698939217c10191b3a4b"
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,1,0,25,0,95,0,13,158,1,
70,24,32,20,18,18,48,36,2,1,
0,33,45,18,18,2,31,88,0,129,
0,46,87,9,2,22,68,105,122,97,
121,110,32,75,90,0,66,0,8,5,
4,40,2,26,66,64,8,45,4,45,
2,26,129,0,16,66,13,5,17,73,
83,73,0,129,0,16,10,12,5,17,
78,69,77,0,67,4,16,15,20,5,
2,26,11,67,4,16,73,20,5,2,
26,11 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t button_1; // =1 if button pressed, else =0
// output variables
uint8_t led_1; // led state 0 .. 1
int8_t level_1; // =0..100 level position
int8_t level_2; // =0..100 level position
char text_1[11]; // string UTF8 end zero
char text_2[11]; // string UTF8 end zero
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_BUTTON_1 5
void setup()
{
RemoteXY_Init ();
pinMode (PIN_BUTTON_1, OUTPUT);
if (digitalRead(5) == HIGH) // if pin 5 enjoyed a high level voltage
RemoteXY.led_1= 255; // then turn on red light
else // else
RemoteXY.led_1= 0; // turn off red
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay()