<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Indicador de estado de entrada]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1394&amp;type=atom" />
	<updated>2021-10-02T04:54:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1394</id>
		<entry>
			<title type="html"><![CDATA[Re: Indicador de estado de entrada]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4286#p4286" />
			<content type="html"><![CDATA[<p>Understood, thank you very much, only required:<br />RemoteXY.led_1 = LOW; or RemoteXY.led_1 = HIGH<br />for the LED on the display to turn on or off</p>]]></content>
			<author>
				<name><![CDATA[gma5_2005]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1948</uri>
			</author>
			<updated>2021-10-02T04:54:09Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4286#p4286</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Indicador de estado de entrada]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4280#p4280" />
			<content type="html"><![CDATA[<p>You have a few issues here...</p><p><strong>1</strong> - Your posted code was not properly formatted for the topic... please use the <strong>&lt;&gt;</strong> icon, that way translations wouldn&#039;t mess up the code.&nbsp; ENTRADA translated as INPUT, which is a protected keyword.&nbsp; Makes it difficult to troubleshoot <img src="https://forum.remotexy.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p><strong>2</strong> - This code doesn&#039;t make sense...<br /></p><div class="quotebox"><cite>gma5_2005 wrote:</cite><blockquote><p>Cordial saludo<br />&nbsp; &nbsp; // output variables<br />&nbsp; uint8_t led_1_r; // led state 0 .. 2</p><br /><br /><p>&nbsp; if(ENTRADA==1)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //digitalWrite(SALIDA,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //delay(2000);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.led_1_r = 255;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p></blockquote></div><p>Are you intending to use a LED with 2 states, as the comment implies? (Should be <strong>uint8_t led_1; // led state 0 .. 2</strong> if generated properly) </p><p>Or an RGB Red Channel, as the code implies? (Should be <strong>uint8_t led_1_r; // =0..255 LED Red brightness</strong>)</p>]]></content>
			<author>
				<name><![CDATA[Gunner]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1840</uri>
			</author>
			<updated>2021-09-27T07:38:07Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4280#p4280</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Indicador de estado de entrada]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4279#p4279" />
			<content type="html"><![CDATA[<p>Cordial saludo</p><p>Estoy realizando una aplicacion en la que un LED cambie de color si la entrada 5 del arduino uno es alto, pero al momento de utilizar la interfaz despues de descargar el codigo, el led en la pantalla del telefono no cambia de color .</p><p>Qué puede ser?</p><p>El código es el siguiente:</p><p>Best regard</p><p>I am making an application in which an LED changes color if input 5 of the arduino uno is high, but when using the interface after downloading the code, the LED on the phone screen does not change color.</p><p>What can be?</p><p>The code is the following: </p><p>//////////////////////////////////////////////<br />//&nbsp; &nbsp; &nbsp; &nbsp; RemoteXY include library&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //<br />//////////////////////////////////////////////</p><p>// RemoteXY select connection mode and include library <br />#define REMOTEXY_MODE__SOFTSERIAL<br />#include &lt;SoftwareSerial.h&gt;</p><p>#include &lt;RemoteXY.h&gt;</p><p>// RemoteXY connection settings <br />#define REMOTEXY_SERIAL_RX 2<br />#define REMOTEXY_SERIAL_TX 3<br />#define REMOTEXY_SERIAL_SPEED 9600</p><br /><p>// RemoteXY configurate&nbsp; <br />#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; { 255,0,0,1,0,13,0,13,13,1,<br />&nbsp; 70,40,27,26,9,9,26,37,135,136 };<br />&nbsp; <br />// this structure defines all the variables and events of your control interface <br />struct {</p><p>&nbsp; &nbsp; // output variables<br />&nbsp; uint8_t led_1_r; // led state 0 .. 2 </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><br /><p>const int BOTON = 5;&nbsp; //Se declara la variable BOTON tipo entero que corresponde al pin 5<br />const int SALIDA = 6;&nbsp; //Se declara la variable SALIDA tipo entero que corresponde al pin 6<br />int ENTRADA;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Se declara la variable ENTRADA tipo entero que almacenará el valor que se lea en el pin 5</p><p>void setup() <br />{</p><p>&nbsp; RemoteXY_Init (); <br />&nbsp; <br />&nbsp; Serial.begin(9600);&nbsp; &nbsp; // configura el puerto serie a 9600bps<br />&nbsp; &nbsp; <br />&nbsp; pinMode(SALIDA,OUTPUT);&nbsp; // configura el pin 6 como salida<br />&nbsp; pinMode(BOTON,INPUT);&nbsp; // configura el pin 5 como entrada<br />&nbsp; Serial.println(&quot;inicio de programa&quot;);<br />&nbsp; <br />}</p><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();<br />&nbsp; <br />&nbsp; ENTRADA = digitalRead(BOTON);&nbsp; &nbsp;//El estado del pin 5 se almacena en la variable ENTRADA </p><p>&nbsp; if(ENTRADA==1)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //digitalWrite(SALIDA,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //delay(2000);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.led_1_r = 255;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// digitalWrite(SALIDA,LOW);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.led_1_r = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp;<br />&nbsp; Serial.println(ENTRADA); // envía valor digital de la entrada al monitor serial */</p><p>&nbsp; //if (digitalRead(5)==HIGH) RemoteXY.led_1_r = 255;<br />&nbsp; //else RemoteXY.led_1_r = 0; </p><br /><p>}</p><br /><br /><br /><p>thanks for your help</p>]]></content>
			<author>
				<name><![CDATA[gma5_2005]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1948</uri>
			</author>
			<updated>2021-09-27T02:38:44Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4279#p4279</id>
		</entry>
</feed>
