<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=587</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=587&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How Arduino can know if Bluethoot RemoteXY App is connected ..]]></description>
		<lastBuildDate>Sat, 29 Sep 2018 13:46:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1831#p1831</link>
			<description><![CDATA[<div class="quotebox"><cite>effevalerio@iol.it wrote:</cite><blockquote><p>and I confirm ;&nbsp; variable &quot;RemoteXY.connect_flag&quot; don&#039;t&nbsp; change with&nbsp; BT status....</p><p>Valerio</p></blockquote></div><p>One of my applications is for controlling two SKY TV boxes.&nbsp; They feed what I call &quot;Green Zone&quot; and &quot;Red Zone&quot; in a sports bar.</p><p>So my channel selection panel has a large LED behind the buttons, which I colour Green when the interface is switched to &quot;Green Zone&quot;, and Red when switched to &quot;Red Zone&quot;.&nbsp; However, if the RemoteXY.connect_flag goes OFF, I colour the LED Blue. And it all works as expected, except that the connect_flag does not come back on again, after it has gone off.</p><p>This can happen because they use the same iPad for their P.O.S. terminal, so thay switch between the apps, and RemoteXY can lose connection.</p><p>Everyone who uses the app knows to &quot;Stop&quot; it, and &quot;Start&quot; it again to restore the correct Green/Red status, which is only displayed if connect_flag is true.</p><p>One thing that strikes me is - how are you testing the flag ?</p><p>If you use...</p><p>if (RemoteXY.connect_flag = 1) { .....</p><p>...that single &quot;=&quot; is the assignment operator, so it will turn the connect_flag on, and the &quot;if&quot; statement will <span class="bbu">always</span> evaluate as true.</p><p>The correct syntax is ...</p><p>if (RemoteXY.connect_flag == 1) { .....</p><p>I always read the == as &quot;is equal to&quot;, and it helps to ensure I use the correct syntax</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sat, 29 Sep 2018 13:46:55 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1831#p1831</guid>
		</item>
		<item>
			<title><![CDATA[Re: How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1830#p1830</link>
			<description><![CDATA[<p>Hi DABA OK I will see if someting happen....</p><p>and OK my sintax about&nbsp; Serial.print(RemoteXY.connect_flag) was wong in my post (not in my sketch....) ;-)</p><p>and I confirm ;&nbsp; variable &quot;RemoteXY.connect_flag&quot; don&#039;t&nbsp; change with&nbsp; BT status....</p><p>Thanks again...</p><p>Valerio</p>]]></description>
			<author><![CDATA[null@example.com (effevalerio@iol.it)]]></author>
			<pubDate>Thu, 27 Sep 2018 15:42:19 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1830#p1830</guid>
		</item>
		<item>
			<title><![CDATA[Re: How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1828#p1828</link>
			<description><![CDATA[<div class="quotebox"><cite>effevalerio@iol.it wrote:</cite><blockquote><p>Hi DABA many thanks for your reply, </p><p>...before to write my post I tryed to add to my sketch follow &quot;monitor line&quot;:</p><p> <strong>SerialPrint(RemoteXY.connect_flag);</strong></p><p>then connect and disconnect the BT app, but nothing happen...</p><p><strong><span style="color: red">may I suggest </span></strong>to add in &quot;Controls&quot; someting like a &quot;Self Alternate Output Variable&quot; <br />that switch between ON and OFF every 1 second like a BLINK<br />in this way, if the connection will be lost, the related RemoteXY Output variable <br />will stop to BLINK, in this way the running skecth, with few appropriate<br />lines of code, can understand when connection is lost.</p><p>Many thanks for your attention.</p><p>Valerio</p></blockquote></div><p>You can suggest as much as you want, but unless the developer of RemoteXY returns to support his creation, we are stuck with what we have.&nbsp; He appears to have abandoned it, and hasn&#039;t been seen on here since April.</p><p>And your command looks a bit off, try</p><div class="codebox"><pre><code>Serial.print(RemoteXY.connect_flag);</code></pre></div><p>that . is important, so is the lower-case p on print.</p><p>I assume you have also &quot;started&quot; your serial comms in setup()</p><div class="codebox"><pre><code>Serial.begin(baudrate);</code></pre></div><p>choose your own baudrate</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Wed, 26 Sep 2018 07:31:45 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1828#p1828</guid>
		</item>
		<item>
			<title><![CDATA[Re: How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1825#p1825</link>
			<description><![CDATA[<p>Hi DABA many thanks for your reply, </p><p>...before to write my post I tryed to add to my sketch follow &quot;monitor line&quot;:</p><p> <strong>SerialPrint(RemoteXY.connect_flag);</strong></p><p>then connect and disconnect the BT app, but nothing happen...</p><p>may I suggest to add in &quot;Controls&quot; someting like a &quot;Self Alternate Output Variable&quot; <br />that switch between ON and OFF every 1 second like a BLINK<br />in this way, if the connection will be lost, the related RemoteXY Output variable <br />will stop to BLINK, in this way the running skecth, with few appropriate<br />lines of code, can understand when connection is lost.</p><p>Many thanks for your attention.</p><p>Valerio</p>]]></description>
			<author><![CDATA[null@example.com (effevalerio@iol.it)]]></author>
			<pubDate>Tue, 25 Sep 2018 07:01:26 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1825#p1825</guid>
		</item>
		<item>
			<title><![CDATA[Re: How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1822#p1822</link>
			<description><![CDATA[<div class="quotebox"><cite>effevalerio@iol.it wrote:</cite><blockquote><p>Hi I need to know (in Arduino)&nbsp; if the my RemoteXY app is connected or not via Bluethoot software serial.<br />There is a way ?</p><p>Many thanks to all of you.</p><p>Valerio</p></blockquote></div><p>Yes, and no....</p><p>If you look at the last entry in the RemoteXY configuration block, you will see</p><p>&nbsp; &nbsp; // other variable<br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0 </p><p>This sort of half works correctly : the &quot;connect_flag&quot; is true (non-zero) when connected, and goes false (zero) if the connection is lost.</p><p>However, I have discovered that if the app connects again, for example, after switching to another app on your phone, your serial communications restarts, but the &quot;connect_flag&quot; stays false.&nbsp; In these scenarios, you have to &quot;Stop&quot; the app, and restart it, to get the connect_flag true again.</p><p>I haven&#039;t delved into the RemoteXY handling code to find the reason, but that must be where the problem exists, because it can&#039;t be the mobile app writing that flag&#039;s value...</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Mon, 24 Sep 2018 22:02:35 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1822#p1822</guid>
		</item>
		<item>
			<title><![CDATA[How Arduino can know if Bluethoot RemoteXY App is connected .]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1821#p1821</link>
			<description><![CDATA[<p>Hi I need to know (in Arduino)&nbsp; if the my RemoteXY app is connected or not via Bluethoot software serial.<br />There is a way ?</p><p>Many thanks to all of you.</p><p>Valerio</p>]]></description>
			<author><![CDATA[null@example.com (effevalerio@iol.it)]]></author>
			<pubDate>Mon, 24 Sep 2018 13:17:15 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1821#p1821</guid>
		</item>
	</channel>
</rss>
