<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — RemoteXY and I2C not working together]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1573&amp;type=atom" />
	<updated>2022-12-08T10:29:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1573</id>
		<entry>
			<title type="html"><![CDATA[RemoteXY and I2C not working together]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4894#p4894" />
			<content type="html"><![CDATA[<p>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.</p><div class="codebox"><pre><code>//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP32CORE_WIFI_POINT
#include &lt;WiFi.h&gt;

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;RemoteXY&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;
#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 &lt;Wire.h&gt;

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

void loop() {
  String value = &quot;!&quot;;
  Wire.beginTransmission(8);       // transmit to device #8
  Wire.write(value.c_str());  // sends these bytes
  Wire.endTransmission();          // stop transmitting
  // delay(100);
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[shamimontherun]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2275</uri>
			</author>
			<updated>2022-12-08T10:29:23Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4894#p4894</id>
		</entry>
</feed>
