<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Arduino input statuses on the phone screen as the led is on or off]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1370</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1370&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Arduino input statuses on the phone screen as the led is on or off.]]></description>
		<lastBuildDate>Fri, 27 Aug 2021 19:11:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Arduino input statuses on the phone screen as the led is on or off]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4206#p4206</link>
			<description><![CDATA[<p>When posting code in this forum, please properly format it by placing the code in between the markers as shown when clicking the <strong>&lt;&gt;</strong> icon in the topic/post editor</p><div class="quotebox"><cite>kzekih wrote:</cite><blockquote><p>&nbsp; <br />&nbsp; if (digitalRead(5) == HIGH) // if pin 5 enjoyed a high level voltage<br />&nbsp; &nbsp; RemoteXY.led_1= 255;&nbsp; &nbsp;// then turn on red light<br />&nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // else<br />&nbsp; &nbsp; RemoteXY.led_1= 0;&nbsp; &nbsp; &nbsp;// turn off red</p></blockquote></div><p>To start... this should be in the <strong>void loop()</strong> not the <strong>void setup ()</strong> else it only runs once on boot</p><p>AND it is not properly written/formatted with brackets {} so it would give a compiling error in the first place.</p><div class="codebox"><pre><code>  
if (digitalRead(5) == HIGH) {  // if pin 5 enjoyed a high level voltage
    RemoteXY.led_1 = 255;  // then turn on red light
 } else {   // else
    RemoteXY.led_1 = 0;  // turn off red
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Fri, 27 Aug 2021 19:11:23 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4206#p4206</guid>
		</item>
		<item>
			<title><![CDATA[Re: Arduino input statuses on the phone screen as the led is on or off]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4205#p4205</link>
			<description><![CDATA[<p>My code is this. Can you tell me what&#039;s the wrong in this code.</p><p> RemoteXY include library&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //<br />//////////////////////////////////////////////</p><p>// RemoteXY select connection mode and include library <br />#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD</p><p>#include &lt;RemoteXY.h&gt;</p><p>// RemoteXY connection settings <br />#define REMOTEXY_SERIAL Serial<br />#define REMOTEXY_SERIAL_SPEED 9600<br />#define REMOTEXY_WIFI_SSID &quot;AirTies_Air5650-1&quot;<br />#define REMOTEXY_WIFI_PASSWORD &quot;kzekih102030&quot;<br />#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot;<br />#define REMOTEXY_CLOUD_PORT 6376<br />#define REMOTEXY_CLOUD_TOKEN &quot;4644ff9d2ef7698939217c10191b3a4b&quot;</p><br /><p>// RemoteXY configurate&nbsp; <br />#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; { 255,1,0,25,0,95,0,13,158,1,<br />&nbsp; 70,24,32,20,18,18,48,36,2,1,<br />&nbsp; 0,33,45,18,18,2,31,88,0,129,<br />&nbsp; 0,46,87,9,2,22,68,105,122,97,<br />&nbsp; 121,110,32,75,90,0,66,0,8,5,<br />&nbsp; 4,40,2,26,66,64,8,45,4,45,<br />&nbsp; 2,26,129,0,16,66,13,5,17,73,<br />&nbsp; 83,73,0,129,0,16,10,12,5,17,<br />&nbsp; 78,69,77,0,67,4,16,15,20,5,<br />&nbsp; 2,26,11,67,4,16,73,20,5,2,<br />&nbsp; 26,11 };<br />&nbsp; <br />// 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 </p><p>&nbsp; &nbsp; // output variables<br />&nbsp; uint8_t led_1; // led state 0 .. 1 <br />&nbsp; int8_t level_1; // =0..100 level position <br />&nbsp; int8_t level_2; // =0..100 level position <br />&nbsp; char text_1[11];&nbsp; // string UTF8 end zero <br />&nbsp; char text_2[11];&nbsp; // string UTF8 end zero </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><p>/////////////////////////////////////////////<br />//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END RemoteXY include&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //<br />/////////////////////////////////////////////</p><p>#define PIN_BUTTON_1 5</p><br /><p>void setup() <br />{<br />&nbsp; RemoteXY_Init (); <br />&nbsp; <br />&nbsp; pinMode (PIN_BUTTON_1, OUTPUT);<br />&nbsp; <br />&nbsp; if (digitalRead(5) == HIGH) // if pin 5 enjoyed a high level voltage<br />&nbsp; &nbsp; RemoteXY.led_1= 255;&nbsp; &nbsp;// then turn on red light<br />&nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // else<br />&nbsp; &nbsp; RemoteXY.led_1= 0;&nbsp; &nbsp; &nbsp;// turn off red<br />&nbsp; &nbsp; <br />&nbsp; // TODO you setup code<br />&nbsp; <br />}</p><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();<br />&nbsp; <br />&nbsp; digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);<br />&nbsp; <br />&nbsp; // TODO you loop code<br />&nbsp; // use the RemoteXY structure for data transfer<br />&nbsp; // do not call delay()</p>]]></description>
			<author><![CDATA[null@example.com (kzekih)]]></author>
			<pubDate>Fri, 27 Aug 2021 10:44:26 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4205#p4205</guid>
		</item>
		<item>
			<title><![CDATA[Re: Arduino input statuses on the phone screen as the led is on or off]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4204#p4204</link>
			<description><![CDATA[<div class="quotebox"><cite>kzekih wrote:</cite><blockquote><p>I&#039;m writing from your examples, but I&#039;m getting an error</p></blockquote></div><p>Hello, this forum is here to assist you, not write your code for you <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; </p><p>Perhaps we can figure out what error you are getting and assist with that?</p>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Thu, 26 Aug 2021 20:12:45 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4204#p4204</guid>
		</item>
		<item>
			<title><![CDATA[Arduino input statuses on the phone screen as the led is on or off]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4203#p4203</link>
			<description><![CDATA[<p>First of all, thank you for creating such a platform. I would like you to help me with something. I&#039;m new to Arduino and trying to learn.&nbsp; I&#039;m using Arduino Nano. I want to see the status of any entry over the phone, but I can&#039;t. As an example, I want to see it with LED on the 4-input phone screen. (turn on led turn on, turn off when off)</p><p>I would be very grateful if you could write a short code example. I&#039;m writing from your examples, but I&#039;m getting an error. I would appreciate it if you write and send the full code in the form of Arduino Nano + wifi Module+1 output+1 input.</p><br /><p>Thank you</p>]]></description>
			<author><![CDATA[null@example.com (kzekih)]]></author>
			<pubDate>Thu, 26 Aug 2021 15:50:49 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4203#p4203</guid>
		</item>
	</channel>
</rss>
