<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — joystick]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=112</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=112&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in joystick.]]></description>
		<lastBuildDate>Sun, 26 Feb 2017 12:25:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: joystick]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=402#p402</link>
			<description><![CDATA[<div class="codebox"><pre><code>if (VELOCIDADE = 0) {</code></pre></div><p><span class="postimg"><img src="https://cdn.meme.am/cache/instances/folder823/500x/75841823.jpg" alt="https://cdn.meme.am/cache/instances/folder823/500x/75841823.jpg" /></span></p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Sun, 26 Feb 2017 12:25:38 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=402#p402</guid>
		</item>
		<item>
			<title><![CDATA[Re: joystick]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=375#p375</link>
			<description><![CDATA[<p>Maybe PIN_MOTOR used same pin that RemoteXY used for SoftSerial?<br />Please publish all sketch.</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sun, 19 Feb 2017 18:57:06 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=375#p375</guid>
		</item>
		<item>
			<title><![CDATA[Re: joystick]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=372#p372</link>
			<description><![CDATA[<p>The code I post have good values in the Serial.print...<br />But is not working... maybe my mistake!!<br />But I&nbsp; can´t understand the problem of my code :s<br />Some help will be great!</p>]]></description>
			<author><![CDATA[null@example.com (AS)]]></author>
			<pubDate>Sun, 19 Feb 2017 02:32:40 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=372#p372</guid>
		</item>
		<item>
			<title><![CDATA[joystick]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=371#p371</link>
			<description><![CDATA[<p>Hi!<br />RemoteXY is a great solution!<br />Simple question or Issue:<br />I want to do a simple solution to use in RC cars, I want control velocity (Up and DOWN) with PWM and direction with (RIGHT and LEFT).<br />This code is for show the values in serie, it works great:</p><div class="codebox"><pre><code>void loop()  
{  
  RemoteXY_Handler (); 

VELOCIDADE = RemoteXY.joystick_1_y;
DIRECAO = RemoteXY.joystick_1_x;
  
  
  Serial.println(&quot;Y-----------------------&quot;);
  Serial.println(VELOCIDADE);
  Serial.println(&quot;X-----------------------&quot;);  
  Serial.println(DIRECAO);

  delay(100); // To see the values

}</code></pre></div><p>But if I put some if&#039;s to control, I admit I have some mistake but I no longer see the &quot;good&quot; values in the </p><div class="codebox"><pre><code>Serial.print</code></pre></div><p>My code is:<br /></p><div class="codebox"><pre><code>void loop()  
{  
  RemoteXY_Handler (); 

  VELOCIDADE = RemoteXY.joystick_1_y;
  DIRECAO = RemoteXY.joystick_1_x;
  
  
  Serial.println(&quot;Y-----------------------&quot;);
  Serial.println(VELOCIDADE);
  Serial.println(&quot;X-----------------------&quot;);  
  Serial.println(DIRECAO);


  if (VELOCIDADE &gt; 0) {
    analogWrite(PIN_MOTOR_UP, VELOCIDADE*2.55);
    analogWrite(PIN_MOTOR_DOWN, 0);    
  }

  if (VELOCIDADE = 0) {
    analogWrite(PIN_MOTOR_UP, 0);
    analogWrite(PIN_MOTOR_DOWN, 0);   
  }

  if (VELOCIDADE &lt; 0) {
    analogWrite(PIN_MOTOR_DOWN, -VELOCIDADE*2.55);
    analogWrite(PIN_MOTOR_UP, 0);      
  }


  if (DIRECAO &gt; 50) {
    digitalWrite(PIN_MOTOR_RIGHT, HIGH);
    digitalWrite(PIN_MOTOR_LEFT, LOW);    
  }

  if (DIRECAO &lt; -50) {
    digitalWrite(PIN_MOTOR_RIGHT, LOW);
    digitalWrite(PIN_MOTOR_LEFT, HIGH);    
  }

  if ((DIRECAO &lt; 50) and (DIRECAO &gt; -50)){
    digitalWrite(PIN_MOTOR_RIGHT, LOW);
    digitalWrite(PIN_MOTOR_LEFT, LOW);    
  }

}</code></pre></div><p>How I should to do to make this simple example work?<br />Thanks a lot!<br />AS</p>]]></description>
			<author><![CDATA[null@example.com (AS)]]></author>
			<pubDate>Sun, 19 Feb 2017 02:18:53 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=371#p371</guid>
		</item>
	</channel>
</rss>
