1

Topic: RemoteXY and I2C not working together

Besides transmitting data using SDA and SCL, I am trying to use RemoteXY. But the transmission is not working when I add RemoteXY_Init ();, otherwise, the I2C communication is OK. I am stuck here. Please help me.

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

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP32CORE_WIFI_POINT
#include <WiFi.h>

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 146 bytes
  { 255,8,0,0,0,139,0,16,31,1,10,48,1,21,7,7,4,26,31,79,
  78,0,31,79,70,70,0,10,48,8,21,7,7,4,26,31,79,78,0,31,
  79,70,70,0,10,48,15,21,7,7,4,26,31,79,78,0,31,79,70,70,
  0,10,48,22,21,7,7,4,26,31,79,78,0,31,79,70,70,0,10,48,
  29,21,7,7,4,26,31,79,78,0,31,79,70,70,0,10,48,36,21,7,
  7,4,26,31,79,78,0,31,79,70,70,0,10,48,43,21,7,7,4,26,
  31,79,78,0,31,79,70,70,0,10,48,50,21,7,7,4,26,31,79,78,
  0,31,79,70,70,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t pushSwitch_1; // =1 if state is ON, else =0 
  uint8_t pushSwitch_2; // =1 if state is ON, else =0 
  uint8_t pushSwitch_3; // =1 if state is ON, else =0 
  uint8_t pushSwitch_4; // =1 if state is ON, else =0 
  uint8_t pushSwitch_5; // =1 if state is ON, else =0 
  uint8_t pushSwitch_6; // =1 if state is ON, else =0 
  uint8_t pushSwitch_7; // =1 if state is ON, else =0 
  uint8_t pushSwitch_8; // =1 if state is ON, else =0 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


#include <Wire.h>

void setup() {
  RemoteXY_Init (); 
  Wire.begin();  // join i2c bus (address optional for master)
  Serial.begin(9600);
}

void loop() {
  String value = "!";
  Wire.beginTransmission(8);       // transmit to device #8
  Wire.write(value.c_str());  // sends these bytes
  Wire.endTransmission();          // stop transmitting
  // delay(100);
}