<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — An idea to improve data transfer efficiency.]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=546&amp;type=atom" />
	<updated>2018-08-04T09:42:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=546</id>
		<entry>
			<title type="html"><![CDATA[An idea to improve data transfer efficiency.]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1737#p1737" />
			<content type="html"><![CDATA[<p>My latest project <a target="_blank" href="http://remotexy.com/en/editor/d088671f1cf259487aed28ee82dbd4d5/">http://remotexy.com/en/editor/d088671f1 … e82dbd4d5/</a> has about 40 buttons, plus a couple of other controls.</p><p>Each button uses a uint8_t variable, 0 or 1 when the button is pressed. This leads to a large, inefficient data block, which I believe exceeds the &quot;packet&quot; size of Bluetooth. This makes the application slow and sluggish to respond to button presses.</p><p>I think in most cases, buttons would be mutually exclusive, so it would be great if we could create one or more &quot;button groups&quot;, and use a single variable to transmit which button is pressed within each group. If that variable were a uint8_t, you could have up to 255 buttons in one group, where value 0 (or 255) could represent &quot;no button pressed&quot;.</p><p>I have also discovered that you can write 0 back to the button variable as soon as you have &quot;seen&quot; it in your code, which prevents you &quot;seeing&quot; it multiple times before RemoteXY writes it back to zero. So instead of having to clear 40 variables, the &quot;button group&quot; idea means you only have to clear 1, which makes your sketch much tidier and efficient.</p><p>Within each button group, you would decide what value to set in the interface, so you easily use &quot;switch - case&quot; constructs in your sketch, very much more efficient than a long list of &quot;if (RemoteXY.ButtonXYZ) statements.</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2018-08-04T09:42:24Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1737#p1737</id>
		</entry>
</feed>
