<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — [solved] Working mode: random/app]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=981&amp;type=atom" />
	<updated>2020-04-21T16:25:22Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=981</id>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2887#p2887" />
			<content type="html"><![CDATA[<p>SOLVED!!! i&#039;ve increased the size of the char from 4 to 7 and i get values!!!</p>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-04-21T16:25:22Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2887#p2887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2885#p2885" />
			<content type="html"><![CDATA[<p>Show FULL code</p><p>And what is the value of rpm whe the problem is happening ?</p><p>itoa works, I use it every days</p>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2020-04-21T13:09:36Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2885#p2885</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2883#p2883" />
			<content type="html"><![CDATA[<p>I think but i could be wrong that the issue is related the way which your app handles interrupts. It isn&#039;t able to work with them,<br />only rounds of engine uses interrupts and so do not work.</p>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-04-21T08:29:13Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2883#p2883</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2881#p2881" />
			<content type="html"><![CDATA[<p>Five for both char variables.</p>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-04-21T05:36:36Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2881#p2881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2879#p2879" />
			<content type="html"><![CDATA[<p>What the length of RemoteXY.giri ?</p>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2020-04-21T04:26:58Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2879#p2879</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2875#p2875" />
			<content type="html"><![CDATA[<p>I&#039;ve just focused my attention on that flag, thanks.</p><p>Some debug:</p><p>1) when i connect, the flag goes 1 and i control the RGB led;</p><p>2)On the app i put 2 char boxes [5], one for the temperature (i read the value no problem) and the other to show RPM of the engine. This second box shows always a <span class="bbu">flashing &quot;00&quot;</span> and when it starts to generate numbers (rounds of engine) suddenly <span class="bbu">the connect_flag goes to 0</span>( i need to reenter in the app).</p><p>I used your guide to convert from int to char with sprintf, itoa doesn&#039;t work.&nbsp; I see right values in my serial monitor, but not in the app (no RPM, yes temperature).</p><br /><p>This is my code, hope it helps:</p><div class="codebox"><pre><code>if (currentmillis - lastmillis &lt;= interval){ 
 detachInterrupt(IR);
 rpm = half_revolutions * ((60000/(currentmillis - lastmillis)));
 //Serial.print(rpm); 
 //Serial.print(&quot; RPM&quot;);
 //Serial.print(&quot;\n&quot;);
 half_revolutions = 0;
 lastmillis = currentmillis;
 attachInterrupt(IR, rpm_fan, FALLING);
  }
sprintf (RemoteXY.giri, &quot;%d&quot;, rpm);

ICACHE_RAM_ATTR void rpm_fan(){
  half_revolutions++;
 }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-04-20T17:52:20Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2875#p2875</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2864#p2864" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>if (RemoteXY.connect_flag != 0) {
  // connection established
}
else {
  // connection off
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2020-04-20T03:52:28Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2864#p2864</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[solved] Working mode: random/app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=2858#p2858" />
			<content type="html"><![CDATA[<p>I&#039;m working with a nodemcu v3 for a project to use at school during open events. My project is done with a RGB led, a Dallas temperature gauge, a DC engine (PWM)+photo resistor+laser beam [i read spins], 16x2 LCD. <br />So the led lights randomly, the engine runs randomly too and on the display it shows the temperature and rounds per minute. This happens when &quot;NO CLIENT&quot; is connected to the nodemcu,<br />While it someone is connected to nodemcu, it will being drived by the app.<br />So i don&#039;t know which syntax to use for my &quot;if&quot; cicle:</p><br /><div class="codebox"><pre><code>if (??????????????????????)
  {
  RemoteXY.rgb_1_r=random(0,255);
  RemoteXY.rgb_1_g=random(0,255);
  RemoteXY.rgb_1_b=random(0,255);
  RemoteXY.slider=random(0,100);
  }</code></pre></div><p>I tried: </p><ul><li><p>WiFi.status() != WL_CONNECTED</p></li><li><p>!client.connected()</p></li><li><p>WiFi.waitForConnectResult() != WL_CONNECTED</p></li><li><p>WiFi.localIP().toString() == &quot;0.0.0.0&quot;</p></li></ul><p>Which is the compatible function to use with the RemoteXY library??? I tried calling the WiFi.begin() function too.<br />Thanks</p>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-04-19T13:18:12Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=2858#p2858</id>
		</entry>
</feed>
