<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Ability to set the state of Controls, from code.]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=24</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=24&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Ability to set the state of Controls, from code..]]></description>
		<lastBuildDate>Fri, 22 Jun 2018 11:38:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1656#p1656</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>I like it. Will think)</p></blockquote></div><p>Have you had enough time to think ?</p><p>The control should not display what it is <span class="bbu">sending</span> - it should be displaying what is set in the control code, Read before write, and only write (once) if the control is activated on the phone.&nbsp; Currently the phone app is sending all the time, which means we cannot overwrite it.&nbsp; If it was <span class="bbu">reading</span> all the time, and only <span class="bbu">sending</span> when changed on the phone, we could update the value at either location, and the control would reflect any changes.</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Fri, 22 Jun 2018 11:38:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1656#p1656</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1035#p1035</link>
			<description><![CDATA[<p>Hello, is there a solution in this case? otherwise we would have to deal with a webserver, which we do not want at the moment, because this software is otherwise absolutely top. regards</p>]]></description>
			<author><![CDATA[null@example.com (gwalkner)]]></author>
			<pubDate>Thu, 02 Nov 2017 10:48:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1035#p1035</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=430#p430</link>
			<description><![CDATA[<div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>Yes I noticed this too. So instead of reconnecting, and if this feature that we are discussing is not added, maybe we could at least have a function RemoteXY.UpdateInputs() or something like that ? <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>I like it. Will think)</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Thu, 02 Mar 2017 07:59:16 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=430#p430</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=426#p426</link>
			<description><![CDATA[<div class="quotebox"><cite>mefi73 wrote:</cite><blockquote><p>changes displayed by reconnecting</p></blockquote></div><p>Yes I noticed this too. So instead of reconnecting, and if this feature that we are discussing is not added, maybe we could at least have a function RemoteXY.UpdateInputs() or something like that ? <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Wed, 01 Mar 2017 14:56:14 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=426#p426</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=425#p425</link>
			<description><![CDATA[<p>changes displayed by reconnecting</p>]]></description>
			<author><![CDATA[null@example.com (mefi73)]]></author>
			<pubDate>Wed, 01 Mar 2017 11:45:28 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=425#p425</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=422#p422</link>
			<description><![CDATA[<p>thats fine for your &#039;pump-station&#039;<br />but things, which are connected to the internet may want to change some values over the air or via integrated sensors - and if that happens, you never recognize this in this app.</p>]]></description>
			<author><![CDATA[null@example.com (mosci)]]></author>
			<pubDate>Wed, 01 Mar 2017 06:39:31 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=422#p422</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=71#p71</link>
			<description><![CDATA[<p>It is not bug.<br />Variable is transmitted in one direction.</p><p>How use two modes &quot;Manual&quot; and &quot;Auto&quot;? <br />I want to show the simple project &quot;PUMP SIMULATION&quot;. </p><p>Interfase: <a target="_blank" href="http://remotexy.com/en/editor/85eecbc8b6f6754e81e0ac76d813ccb6/">http://remotexy.com/en/editor/85eecbc8b … 6d813ccb6/</a><br />Full code for bluetooth HC-06:<br /></p><div class="codebox"><pre><code>//////////////////////////////////////////////
//        RemoteXY include library          //
//     use  library  version 2.2.5 or up    //
//   use ANDROID app version 3.7.1 or up    //
//////////////////////////////////////////////

/* RemoteXY select connection mode and include library */ 
#define REMOTEXY_MODE__SOFTSERIAL
#include &lt;SoftwareSerial.h&gt; 

#include &lt;RemoteXY.h&gt; 

/* RemoteXY connection settings */ 
#define REMOTEXY_SERIAL_RX 2 
#define REMOTEXY_SERIAL_TX 3 
#define REMOTEXY_SERIAL_SPEED 9600 


/* RemoteXY configurate  */ 
#pragma pack(push, 1) 
uint8_t RemoteXY_CONF[] = 
  { 4,2,237,0,6,0,2,7,54,4
  ,30,32,10,4,70,32,11,5,2,0
  ,4,10,31,10,4,12,31,10,2,77
  ,65,78,85,65,76,0,65,85,84,79
  ,0,2,0,4,49,31,10,4,39,31
  ,10,2,79,78,0,79,70,70,0,66
  ,1,44,3,36,47,41,6,10,77,5
  ,65,4,48,52,9,9,16,87,9,9
  ,2,129,0,6,30,18,6,4,75,0
  ,6,0,0,129,0,82,45,9,6,53
  ,79,6,4,9,48,37,0,129,0,82
  ,24,9,6,53,42,8,4,9,53,48
  ,37,0,129,0,81,3,15,6,52,7
  ,11,4,9,49,48,48,37,0,129,0
  ,4,23,31,6,4,64,24,5,8,65
  ,117,116,111,32,108,101,118,101,108,58
  ,0,129,0,3,3,34,6,4,5,29
  ,5,8,80,117,109,112,32,109,111,100
  ,101,0,129,0,4,43,21,6,4,32
  ,18,5,8,77,97,110,117,97,108,0
  ,130,1,3,22,36,19,2,30,35,23
  ,0,130,1,3,42,36,18,2,58,35
  ,25,0,129,0,60,54,18,6,28,89
  ,26,6,3,80,117,109,112,32,111,110
  ,0 }; 
   
/* this structure defines all the variables of your control interface */ 
struct { 

    /* input variable */
  int16_t edit_level;  /* −32767.. +32767 */
  uint8_t switch_manual; /* =1 if switch ON and =0 if OFF */
  uint8_t switch_pump; /* =1 if switch ON and =0 if OFF */

    /* output variable */
  int8_t level; /* =0..100 level position */
  uint8_t led_on_r; /* =0..255 LED Red brightness */

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

} RemoteXY; 
#pragma pack(pop) 

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

float level = 50.0;
boolean pump = false;

void setup()  
{ 
  RemoteXY_Init ();  
   
  RemoteXY.edit_level = 50;
   
} 

long pt=0;

void loop()  
{  
  RemoteXY_Handler (); 

  // TIME COUNTER
  long t = millis ();
  long dt = t - pt;
  pt = t;
  
  // PUMP EMULATION 
  level = level + 0.001*dt; 
  if (pump) level=level-0.003*dt;
  if (level&lt;0) level = 0;
  if (level&gt;100) level = 100;

  // MAIN CODE
  if (RemoteXY.switch_manual == 1) {
    if (RemoteXY.switch_pump == 1) pump = true;
    else pump = false;
  }
  else {
    if ((level&gt;RemoteXY.edit_level+5) &amp;&amp; (!pump)) pump = true;
    if ((level&lt;RemoteXY.edit_level-5) &amp;&amp; (pump)) pump = false;    
  }
   
  RemoteXY.level = level;
  if (pump) RemoteXY.led_on_r = 255;
  else RemoteXY.led_on_r = 0;

  delay (2);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sat, 14 Jan 2017 18:26:23 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=71#p71</guid>
		</item>
		<item>
			<title><![CDATA[Ability to set the state of Controls, from code.]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=68#p68</link>
			<description><![CDATA[<p>Hi,</p><p>Currently we can set the color of a Led, modify a Text, etc, but why can&#039;t we set the state of Controls ?</p><p>Let&#039;s say I have a Switch to control a relay, but the code can also take control of the relay. So if the code change the state of the relay, actually, the UI can&#039;t reflect this change.</p><p>In code words, why are such variables read-only ?</p><div class="codebox"><pre><code>uint8_t switch_1; /* =1 if switch ON and =0 if OFF */
uint8_t select_1; /* =0 if select position A, =1 if position B, =2 if position C, ... */
... and all other controls, except Button maybe :)</code></pre></div><p>More than a new feature to be added, I actually think it&#039;s a bug to be fixed <img src="https://forum.remotexy.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Sat, 14 Jan 2017 16:41:54 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=68#p68</guid>
		</item>
	</channel>
</rss>
