<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Floats via the ReliableDatagram from RadioHead - Arduino				            </title>
            <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/</link>
            <description>Discussion board for Robotics, Arduino, Raspberry Pi and other DIY electronics and modules. Join us today!</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 12 Apr 2026 19:35:18 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11871</link>
                        <pubDate>Thu, 18 Jun 2020 07:39:40 +0000</pubDate>
                        <description><![CDATA[Posted by: @rogue 
Hi frogandtoad, this is a nice hint. I will try that, next time when I do any serial communication with floats. Thanks!

You&#039;re welcome!
Let us know how you go :-)]]></description>
                        <content:encoded><![CDATA[<blockquote data-userid="2550" data-postid="11848" data-mention="rogue">
<div class="wpforo-post-quote-author"><strong> Posted by: @rogue </strong></div>
<p>Hi frogandtoad, this is a nice hint. I will try that, next time when I do any serial communication with floats. Thanks!</p>
</blockquote>
<p>You're welcome!</p>
<p>Let us know how you go :-)</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>frogandtoad</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11871</guid>
                    </item>
				                    <item>
                        <title>RE: Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11848</link>
                        <pubDate>Wed, 17 Jun 2020 03:13:51 +0000</pubDate>
                        <description><![CDATA[Hi frogandtoad, this is a nice hint. I will try that, next time when I do any serial communication with floats. Thanks!]]></description>
                        <content:encoded><![CDATA[<p>Hi frogandtoad, this is a nice hint. I will try that, next time when I do any serial communication with floats. Thanks!</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>ROGUE</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11848</guid>
                    </item>
				                    <item>
                        <title>RE: Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11756</link>
                        <pubDate>Thu, 11 Jun 2020 12:43:19 +0000</pubDate>
                        <description><![CDATA[@rogue
There is an easier way ;-)
void setup() {
  Serial.begin(9600);

  float sensorValue = -1.0912345;
  byte decimalPlaces = 3; // IIRC... Max dp == 6

  // First, convert to str...]]></description>
                        <content:encoded><![CDATA[<p>@rogue</p>
<p>There is an easier way ;-)</p>
<pre><span style="color: #00979c">void</span> <span style="color: #5e6d03">setup</span><span style="color: #000000">(</span><span style="color: #000000">)</span> <span style="color: #000000">{</span>
  <strong><span style="color: #d35400">Serial</span></strong><span style="color: #434f54">.</span><span style="color: #d35400">begin</span><span style="color: #000000">(</span><span style="color: #000000">9600</span><span style="color: #000000">)</span><span style="color: #000000">;</span>

  <span style="color: #00979c">float</span> <span style="color: #000000">sensorValue</span> <span style="color: #434f54">=</span> <span style="color: #434f54">-</span><span style="color: #000000">1.0912345</span><span style="color: #000000">;</span>
  <span style="color: #00979c">byte</span> <span style="color: #000000">decimalPlaces</span> <span style="color: #434f54">=</span> <span style="color: #000000">3</span><span style="color: #000000">;</span> <span style="color: #434f54">// IIRC... Max dp == 6</span>

  <span style="color: #434f54">// First, convert to string...</span>
  <span style="color: #00979c">String</span> <span style="color: #000000">data</span> <span style="color: #434f54">=</span> <span style="color: #00979c">String</span><span style="color: #000000">(</span><span style="color: #000000">sensorValue</span><span style="color: #434f54">,</span> <span style="color: #000000">decimalPlaces</span><span style="color: #000000">)</span><span style="color: #000000">;</span>

  <span style="color: #434f54">// At the recieving end of the nRF24L01...</span>
  <span style="color: #434f54">// Convert it back to a float and perform calculations if necessary.</span>
  <span style="color: #00979c">float</span> <span style="color: #000000">floatReceieved</span> <span style="color: #434f54">=</span> <span style="color: #000000">data</span><span style="color: #434f54">.</span><span style="color: #000000">toFloat</span><span style="color: #000000">(</span><span style="color: #000000">)</span><span style="color: #000000">;</span>
 <span style="color: #000000">}</span>
</pre>
<p>Cheers!</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>frogandtoad</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11756</guid>
                    </item>
				                    <item>
                        <title>RE: Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11747</link>
                        <pubDate>Wed, 10 Jun 2020 23:31:31 +0000</pubDate>
                        <description><![CDATA[Hi again, forgot to say something important... the transmission can be done (usualy) by (ASCII-)caracters... therfore the uint8_t-value-space (0-255), of cause you can convert each number of...]]></description>
                        <content:encoded><![CDATA[<p>Hi again, forgot to say something important... the transmission can be done (usualy) by (ASCII-)caracters... therfore the uint8_t-value-space (0-255), of cause you can convert each number of the value into a char (including the negative-sign) and send them seperately... i.e. for the temperature value of -24,25 send: '-', '2', '4', '.', '2', '5' if you just want to display them on RX that's OK. Of cause you have to convert the chars to a float to do calculations like a trend or the average </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>ROGUE</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11747</guid>
                    </item>
				                    <item>
                        <title>RE: Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11714</link>
                        <pubDate>Tue, 09 Jun 2020 14:24:33 +0000</pubDate>
                        <description><![CDATA[Hi duddimobile,
got the same problem, there are a two solutions: one simple, just to get it work (that may not satisfy you at all) just leave the decimals. In my project I used three DHT11-...]]></description>
                        <content:encoded><![CDATA[<p>Hi duddimobile,</p>
<p>got the same problem, there are a two solutions: one simple, just to get it work (that may not satisfy you at all) just leave the decimals. In my project I used three DHT11-sensors (stacked near beside in a beadboard for testing purposes) ...the values differed by 2°C and up to 4% huminity, so I think they are not that precise. That may be a good reason to forget the decimals. Next, not that simple is to split the DHT11-values into two parts integer and decimal, TX them and put them together in the RX-unit for display. (! Keep in mind that temperature can be minus! - that's another problem that has to be solved.)</p>
<p>Hope it will be fun to puzzle that out yourself! Hope this will be helpful.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>ROGUE</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11714</guid>
                    </item>
				                    <item>
                        <title>Floats via the ReliableDatagram from RadioHead</title>
                        <link>https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11710</link>
                        <pubDate>Tue, 09 Jun 2020 09:02:34 +0000</pubDate>
                        <description><![CDATA[Hi there,
I want to try to use the joystick demo from the article about nRF24L01+ wireless module using the ReliableDatagram from RadioHead. Instead of the joystick i want to use a DHT11 te...]]></description>
                        <content:encoded><![CDATA[<p>Hi there,</p>
<p>I want to try to use the joystick demo from the article about nRF24L01+ wireless module using the ReliableDatagram from RadioHead. Instead of the joystick i want to use a DHT11 temperature and humidity sensor and send the data to the server (receiver).</p>
<p>The problem I face is that values from the joystick are integers but im reading floats from the DHT sensor.<br />What should I use instead of the 8-bit unsigned integer array (uint8_t) to send the values correctly?</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Duddimobile</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/floats-via-the-reliabledatagram-from-radiohead/#post-11710</guid>
                    </item>
							        </channel>
        </rss>
		