<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Arduino Leonardo OTG]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1344&amp;type=atom" />
	<updated>2021-07-08T22:00:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1344</id>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4107#p4107" />
			<content type="html"><![CDATA[<p>I have followed and even tested with my own ATmega32u4 based &quot;Leonardo&quot;, in my case a Pro Micro that the IDE detects as a Leonardo... still no results.&nbsp; </p><p>But I suspect the issue is caused by the same reason the Leonardo is unique... it&#039;s ability to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.</p><div class="quotebox"><cite>remotexyknight wrote:</cite><blockquote><p>When i generate an example Sketch on the RemoteXY Webpape for Arduino Mega, Uno, Nano or Wemos D1 mini, everything works fine over USB OTG.</p></blockquote></div><p>In my opinion, all the effort to make the Leonardo work with OTG effectively negates it&#039;s unique abilities, compared to other Arduinos... so just use an UNO and save the Leonardo for a task it is better suited for.</p>]]></content>
			<author>
				<name><![CDATA[Gunner]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1840</uri>
			</author>
			<updated>2021-07-08T22:00:07Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4107#p4107</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4106#p4106" />
			<content type="html"><![CDATA[<p>Yes, i do.</p>]]></content>
			<author>
				<name><![CDATA[remotexyknight]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1881</uri>
			</author>
			<updated>2021-07-08T19:20:18Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4106#p4106</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4100#p4100" />
			<content type="html"><![CDATA[<p>Do you choose 9600 speed in the app?</p>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2021-07-08T04:04:55Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4100#p4100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4099#p4099" />
			<content type="html"><![CDATA[<p>Thank you for your reply.</p><br /><p>I delete the old library and installed the new library 3.1.7&nbsp; &nbsp; -&nbsp; but it didn´t work. </p><p>The sketch compile without issues. But when i connect my Leonardo to the Smartphone, i become this error message...</p><p>...30.305 App version 4.8.01,API29<br />...30.305 Device started<br />...30.305 USB connection started<br />...30.305 Connecting to USB device: VID 2341, PID 8036 ...<br />...31.334 USB device connected<br />...31.363 Receiving GUI configuration...<br />...32.364 Read timeout error<br />...32.364 Receiving GUI configuration,try 2 ...<br />...33.365 Read timeout error<br />...33.365 Receiving GUI configuration,try 3 ...<br />...38.367 Read timeout error<br />...38.367 Receiving GUI configuration,try 4 ...<br />...38.368 Write error: Error writing 6 bytes at offset 0 length 6<br />...38.368 Disconnect</p><br /><p>Regards,<br />Andy</p>]]></content>
			<author>
				<name><![CDATA[remotexyknight]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1881</uri>
			</author>
			<updated>2021-07-07T16:57:06Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4099#p4099</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4098#p4098" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>remotexyknight wrote:</cite><blockquote><p>&quot;#define REMOTEXY_SERIAL Serial&quot;</p><p>Unfortunately the sketch do not compile, when i change the line.</p><p>Regards<br />Andy</p></blockquote></div><p>Try download library 3.1.7 from github <a target="_blank" href="https://github.com/RemoteXY/RemoteXY-Arduino-library">https://github.com/RemoteXY/RemoteXY-Arduino-library</a> (press CODE button and Download ZIP)<br />And use next code:</p><div class="codebox"><pre><code>#define REMOTEXY_MODE__CDCSERIAL

#include &lt;RemoteXY.h&gt;

#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,13,0,11,13,0,
  1,0,48,25,12,12,2,31,88,0 };
  
struct {

    // input variables
  uint8_t button_1; // =1 if button pressed, else =0 

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

} RemoteXY;
#pragma pack(pop)




void setup() 
{
  RemoteXY_Init (); 
  
}

void loop() 
{ 
  RemoteXY_Handler ();

}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2021-07-07T04:33:48Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4098#p4098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4097#p4097" />
			<content type="html"><![CDATA[<p>It will only compile with <strong>Serial1</strong>... however, still no worky (for me).</p>]]></content>
			<author>
				<name><![CDATA[Gunner]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1840</uri>
			</author>
			<updated>2021-07-05T07:13:49Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4097#p4097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4096#p4096" />
			<content type="html"><![CDATA[<p>&quot;#define REMOTEXY_SERIAL Serial&quot;</p><p>Unfortunately the sketch do not compile, when i change the line.</p><p>Regards<br />Andy</p>]]></content>
			<author>
				<name><![CDATA[remotexyknight]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1881</uri>
			</author>
			<updated>2021-07-05T07:08:20Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4096#p4096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4091#p4091" />
			<content type="html"><![CDATA[<p>We will check it.<br />Try to replase in code<br /></p><div class="codebox"><pre><code>//#define REMOTEXY_SERIAL Serial1
#define REMOTEXY_SERIAL Serial</code></pre></div>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2021-07-04T03:50:28Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4091#p4091</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4090#p4090" />
			<content type="html"><![CDATA[<p>Hello.&nbsp; This will hot be a solution, as I haven&#039;t figured it out myself... I have tried to get my own Leonardo board working and it too stalls out on receiving the GUI</p><p>But more informative I hope.</p><p>The Leonardo is a bit unique with it&#039;s USB connectivity... the following is excerpts from the Arduino site</p><p><strong><em>The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor</em></strong></p><p><strong><em>Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Leonardo, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class.</em></strong></p><p>So basically I think the issue is that the RemoteXY library is trying to communicate over Serial, when with the Leonardo&nbsp; think it needs to be Serial1... but who knows, I could be completely wrong as well <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I have also noticed that the library keeps trying to use SoftwareSerial??&nbsp; There is a HardwareSerial option in the library, but I haven&#039;t quite figured out how to get it to compile (let alone use Serial1)</p>]]></content>
			<author>
				<name><![CDATA[Gunner]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1840</uri>
			</author>
			<updated>2021-07-04T03:28:35Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4090#p4090</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Arduino Leonardo OTG]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4089#p4089" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I would like to connect my Arduino Leonardo directly over USB OTG. (whitout USB to TTL converter)</p><p>When i generate an example Sketch on the RemoteXY Webpape for Arduino Mega, Uno, Nano or&nbsp; Wemos D1 mini, everything works fine over USB OTG.</p><p>But when I generate an example Sketch for Arduino Leonardo, my Smartphone find the Arduino Leonardo, but can´t receiving the GUI Configuration.</p><p>Had someone the same Issues?</p><p>Regards<br />Andy<br />PS: ...sorry for my English...</p>]]></content>
			<author>
				<name><![CDATA[remotexyknight]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1881</uri>
			</author>
			<updated>2021-07-03T20:18:17Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4089#p4089</id>
		</entry>
</feed>
