Topic: Remotexy will not connect to cloud server
I have written a small bit of test code for testing purposes below.
I have an Arduino Mega with onboard wifi via the ESP8266 chip. The Arduino and the ESP8266 communicate via the serail 3 port.
The test code works fine via the remotexy app on my Android smartphone.
Whne i cut and paste my test code and place it into my irrigation system code the app fails to connect to the server. I am not sure why this occurs, can you please assist.
I'm not sure how to upload an image of the server error codes. I have a jpg file i can share, just dont know how to upload it here.
I can not upload my irrigation system code as it exceeds the number of allowable bytes. How else can I uplaod my irrigation code?
This is the test code:
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial3
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "intentionally left blank"
#define REMOTEXY_WIFI_PASSWORD "intentionally left blank"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "intentionally left blank"
int led = 13;
int ledstate = 0;
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,1,0,0,0,16,0,10,13,0,
1,9,8,13,26,7,2,37,116,101,
115,116,0 };
// 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
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
void setup()
{
RemoteXY_Init ();
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
if (RemoteXY.button_1!=0)
{
if (ledstate == 0)
{
digitalWrite(led, HIGH);
ledstate = 1;
RemoteXY.button_1 = 0;
}
else
{
digitalWrite(led, LOW);
ledstate = 0;
RemoteXY.button_1 = 0;
}
}