<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=4&amp;t=4939" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2009-12-10T02:11:57+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=4&amp;t=4939</id>
<entry>
<author><name><![CDATA[doddsiedodds]]></name></author>
<updated>2009-12-10T02:11:57+01:00</updated>
<published>2009-12-10T02:11:57+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23652#p23652</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23652#p23652"/>
<title type="html"><![CDATA[Bluetooth transmission of sensor data]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23652#p23652"><![CDATA[
I've realised it might be possible to speed this up by instead transferring the 16 bit integer as 2 separate 8 bit integers by sending the integer first then the integer again after applying a right shift of 8 bits. Something like this:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>DIM X AS INTEGER<br />DIM XSHIFT AS INTEGER<br /><br />X = AD&#40;0&#41;<br />ETX 4800, X<br />XSHIFT = X &gt;&gt; 8<br />ETX 4800, XSHIFT<br /></code></dd></dl><br /><br />This would reduce it down from 3 transmissions to 2 as well as requiring far less calculation (no need to work out each digit and convert to ascii) on the robot board itself but more on the receiving PC.<br /><br />Not sure how i would go about coding the receiving end to perform the reverse and ANDing the high and low order bytes together - never done any programming using the serial port on a PC.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1817">doddsiedodds</a> — Thu Dec 10, 2009 2:11 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[doddsiedodds]]></name></author>
<updated>2009-12-08T23:50:37+01:00</updated>
<published>2009-12-08T23:50:37+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23623#p23623</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23623#p23623"/>
<title type="html"><![CDATA[Bluetooth transmission of sensor data]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=4939&amp;p=23623#p23623"><![CDATA[
Hey guys,<br /><br />I've been working on trying to get robonova to transmit the sensor data from the 2 axis accelerometer to my terminal on the PC with varying degrees of success. I'm taking the value of the sensor in as an INTEGER and so this complicated matters but i've managed to get something working, don't know if anyone is interested. <br /><br />It's formatted so you can load up the captured transmitted data into excel or numbers etc and plot lovely graphs of your robonova's orientation over time!<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code><br /><br />'------------- DECLARING VARIABLES ------------------'<br />DIM X AS INTEGER<br />DIM CurrentDigitUnits AS BYTE<br />DIM CurrentDigitTens AS BYTE<br />DIM CurrentDigitHundreds AS BYTE<br />DIM SendDigit AS BYTE<br />DIM CarriageReturn AS BYTE<br />DIM LineFeed AS BYTE<br />DIM Comma AS BYTE<br />DIM Space AS BYTE<br />DIM TXout AS BYTE<br />CarriageReturn = 13<br />LineFeed = 10<br />Space = &quot; &quot;<br />'-----------------------------------------------------------'<br /><br /><br /><br />'------------ Transmission Subroutine----------------'<br /><br />Transmission:<br /><br />X = AD&#40;0&#41;<br />CurrentDigitHundreds = X / 100<br />SendDigit = 48 + CurrentDigitHundreds<br />ETX 4800, SendDigit<br />CurrentDigitTens = X / 10<br />CurrentDigitTens = CurrentDigitTens % 10<br />SendDigit  = 48 + CurrentDigitTens<br />ETX 4800, SendDigit<br />CurrentDigitUnits = X % 10<br />SendDigit  = 48 + CurrentDigitUnits<br />ETX 4800, SendDigit<br />ETX 4800, LineFeed<br />ETX 4800, CarriageReturn<br />GOSUB Transmission<br />END<br />'----------------------------------------------------'<br /><br /></code></dd></dl><br /><br />I'm aware it looks a bit odd (I'm not taking the modulus of the hundreds digit for example) But it all works a-ok! Line feed and carriage return might result in a double spacing of lines depending on your terminal.<br /><br />Doddsie<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1817">doddsiedodds</a> — Tue Dec 08, 2009 11:50 pm</p><hr />
]]></content>
</entry>
</feed>