<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — two users]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1353</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1353&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in two users.]]></description>
		<lastBuildDate>Thu, 05 Aug 2021 11:02:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4178#p4178</link>
			<description><![CDATA[<p>I checked now does not work well</p>]]></description>
			<author><![CDATA[null@example.com (radaizzhrea)]]></author>
			<pubDate>Thu, 05 Aug 2021 11:02:46 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4178#p4178</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4177#p4177</link>
			<description><![CDATA[<p>Yes, this is an unpleasant feature of synchronization, it is better not to use buttons. We need to think about how this can be solved.</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Thu, 05 Aug 2021 10:22:20 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4177#p4177</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4176#p4176</link>
			<description><![CDATA[<p>I understood a lot of thanks for the help</p>]]></description>
			<author><![CDATA[null@example.com (radaizzhrea)]]></author>
			<pubDate>Thu, 05 Aug 2021 10:11:28 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4176#p4176</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4175#p4175</link>
			<description><![CDATA[<p>OK, I think I see the issue.&nbsp; Buttons do <strong>not</strong> appear properly synced across multiple &quot;users/phones&quot;.&nbsp; So since your code is seeing that all buttons are 0 unless pressed, then if a button is pressed on one phone, thus sending a 1 to a pin, it is immediately set back to 0 by the 2nd phone.</p><p>If <strong>both</strong> &quot;users/phones&quot; press the same button then it will work as expected... but that is not an ideal solution <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>So unless the developer can add that button sync into a future version, you can either use switches instead of buttons (they do sync from my experience).</p><p>Or if you don&#039;t need a response from button release, you can use a button press to toggle a digital pin state.&nbsp; EG. each button press (from same or 2nd phone) changes the pin state.</p><div class="codebox"><pre><code>void loop() { 
  RemoteXY_Handler ();

  if (RemoteXY.button_1 == 1){ // Only trigger when button pressed
    digitalWrite(PIN_BUTTON_1, !digitalRead(PIN_BUTTON_1));  // Toggle pin state
  }
    if (RemoteXY.button_2 == 1){ // Only trigger when button pressed
    digitalWrite(PIN_BUTTON_2, !digitalRead(PIN_BUTTON_2));  // Toggle pin state
  }
    if (RemoteXY.button_3 == 1){ // Only trigger when button pressed
    digitalWrite(PIN_BUTTON_3, !digitalRead(PIN_BUTTON_3));  // Toggle pin state
  }
    if (RemoteXY.button_4 == 1){ // Only trigger when button pressed
    digitalWrite(PIN_BUTTON_4, !digitalRead(PIN_BUTTON_4));  // Toggle pin state
  }
} </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Thu, 05 Aug 2021 09:30:29 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4175#p4175</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4165#p4165</link>
			<description><![CDATA[<p>This is the full sketch</p><div class="codebox"><pre><code>*/

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

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

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;RAMPA3&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;
#define REMOTEXY_SERVER_PORT 8080


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,4,0,0,0,114,0,13,16,1,
  1,0,16,2,33,33,2,31,226,172,
  134,239,184,143,215,148,215,168,215,158,
  215,148,226,172,134,239,184,143,0,1,
  0,2,37,26,26,2,31,226,172,133,
  239,184,143,215,164,215,170,215,153,215,
  151,215,148,0,1,0,36,37,26,26,
  2,31,215,166,215,153,215,147,215,149,
  215,147,32,226,158,161,239,184,143,0,
  1,0,17,64,31,31,2,31,226,172,
  135,239,184,143,215,148,215,149,215,168,
  215,147,215,148,226,172,135,239,184,143,
  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 
  uint8_t button_2; // =1 if button pressed, else =0 
  uint8_t button_3; // =1 if button pressed, else =0 
  uint8_t button_4; // =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          //
/////////////////////////////////////////////

#define PIN_BUTTON_1 D1
#define PIN_BUTTON_2 D6
#define PIN_BUTTON_3 D5
#define PIN_BUTTON_4 D2


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_1, OUTPUT);
  pinMode (PIN_BUTTON_2, OUTPUT);
  pinMode (PIN_BUTTON_3, OUTPUT);
  pinMode (PIN_BUTTON_4, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?HIGH:LOW);
  digitalWrite(PIN_BUTTON_2, (RemoteXY.button_2==0)?HIGH:LOW);
  digitalWrite(PIN_BUTTON_3, (RemoteXY.button_3==0)?HIGH:LOW);
  digitalWrite(PIN_BUTTON_4, (RemoteXY.button_4==0)?HIGH:LOW);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


} </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (radaizzhrea)]]></author>
			<pubDate>Wed, 04 Aug 2021 05:40:31 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4165#p4165</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4162#p4162</link>
			<description><![CDATA[<p>Well... your code posted above (<em>and unformatted - Use the &lt;&gt; button in the post editor</em>) wont do anything with the partial code shown, so not sure how anyone can assist further.</p>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Tue, 03 Aug 2021 18:19:18 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4162#p4162</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4161#p4161</link>
			<description><![CDATA[<p>When I connect two phones then the operation of the relay stops when I disconnect the other phone everything works great</p>]]></description>
			<author><![CDATA[null@example.com (radaizzhrea)]]></author>
			<pubDate>Tue, 03 Aug 2021 14:21:47 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4161#p4161</guid>
		</item>
		<item>
			<title><![CDATA[Re: two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4131#p4131</link>
			<description><![CDATA[<div class="quotebox"><cite>radaizzhrea wrote:</cite><blockquote><p>How do i add the correct command that will work with two users</p></blockquote></div><p>I don&#039;t think you need any special &quot;command&quot; or code... I can use the same project (at least via WiFi) with multiple devices (phones/tablets) simultaneously.</p>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Sun, 25 Jul 2021 08:24:14 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4131#p4131</guid>
		</item>
		<item>
			<title><![CDATA[two users]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4128#p4128</link>
			<description><![CDATA[<p>Hi<br />This is my sketch setting<br />How do i add the correct command that will work with two users<br />Thanks for the help</p><br /><br /><br /><p>// RemoteXY select connection mode and include library<br />#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT<br />#include &lt;ESP8266WiFi.h&gt;</p><p>#include &lt;RemoteXY.h&gt;</p><p>// RemoteXY connection settings<br />#define REMOTEXY_WIFI_SSID &quot;RAMPA1&quot;<br />#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;<br />#define REMOTEXY_SERVER_PORT 8080</p><br /><p>// RemoteXY configurate <br />#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; { 255,4,0,0,0,114,0,11,16,1,<br />&nbsp; 1,0,16,2,33,33,2,31,226,172,<br />&nbsp; 134,239,184,143,215,148,215,168,215,158,<br />&nbsp; 215,148,226,172,134,239,184,143,0,1,<br />&nbsp; 0,2,37,26,26,2,31,226,172,133,<br />&nbsp; 239,184,143,215,164,215,170,215,153,215,<br />&nbsp; 151,215,148,0,1,0,36,37,26,26,<br />&nbsp; 2,31,215,166,215,153,215,147,215,149,<br />&nbsp; 215,147,32,226,158,161,239,184,143,0,<br />&nbsp; 1,0,17,64,31,31,2,31,226,172,<br />&nbsp; 135,239,184,143,215,148,215,149,215,168,<br />&nbsp; 215,147,215,148,226,172,135,239,184,143,<br />&nbsp; 0 };</p><p>// this structure defines all the variables and events of your control interface<br />struct {</p><p>&nbsp; &nbsp; // input variables<br />&nbsp; uint8_t button_1; // =1 if button pressed, else =0<br />&nbsp; uint8_t button_2; // =1 if button pressed, else =0<br />&nbsp; uint8_t button_3; // =1 if button pressed, else =0<br />&nbsp; uint8_t button_4; // =1 if button pressed, else =0</p><p>&nbsp; &nbsp; // other variable<br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0</p><p>} RemoteXY;<br />#pragma pack(pop)</p>]]></description>
			<author><![CDATA[null@example.com (radaizzhrea)]]></author>
			<pubDate>Sat, 24 Jul 2021 18:03:36 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4128#p4128</guid>
		</item>
	</channel>
</rss>
