<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to display a float number via bluetooth]]></title><description><![CDATA[<p dir="auto">Good evening<br />
I have only recently started using GUI-O and have not yet been able to understand how I can display a simple float variable on the display if a bluetooth connection is used. Is there perhaps a good example in this forum that explains my problem?<br />
Thank you very much for your support.<br />
Regards Fehr</p>
]]></description><link>https://forum.gui-o.com/topic/225/how-to-display-a-float-number-via-bluetooth</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 23:58:50 GMT</lastBuildDate><atom:link href="https://forum.gui-o.com/topic/225.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Oct 2024 16:04:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to display a float number via bluetooth on Wed, 30 Oct 2024 20:55:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/986">@Fehr</a> No problem!</p>
<p dir="auto">I plan to write a FAQ page on GUI-O website, which will also include this explanation.</p>
<p dir="auto">Best regards,<br />
Kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/916</link><guid isPermaLink="true">https://forum.gui-o.com/post/916</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Wed, 30 Oct 2024 20:55:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Wed, 30 Oct 2024 09:47:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a><br />
Thank you very much for your support.<br />
To use  a string instead of a char array is even easier <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=e84f1c759a8" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.gui-o.com/post/915</link><guid isPermaLink="true">https://forum.gui-o.com/post/915</guid><dc:creator><![CDATA[Fehr]]></dc:creator><pubDate>Wed, 30 Oct 2024 09:47:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Tue, 29 Oct 2024 06:55:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/986">@Fehr</a> Hi.</p>
<p dir="auto">The easier way is to fist create a label (like <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/217">@Bernard</a> suggested):</p>
<pre><code>"|LB UID:my_label X:50 Y:50"
</code></pre>
<p dir="auto">Then just modify its TXT property:</p>
<pre><code>@my_label TXT:\"&lt;value&gt;\"\r\n
</code></pre>
<p dir="auto">If you don't want to use snprintf, you can just use + operator:</p>
<pre><code>String str = "@my_label TXT:" + "\"" + String(val) + + "\"" + "\n\r";
</code></pre>
<p dir="auto">You can simply create a function to avoid repeating this command with different TXT values.</p>
<p dir="auto">P. S. Similar topic:<br />
<a href="https://forum.gui-o.com/post/116">https://forum.gui-o.com/post/116</a></p>
<p dir="auto">Best regards,<br />
Kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/911</link><guid isPermaLink="true">https://forum.gui-o.com/post/911</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Tue, 29 Oct 2024 06:55:02 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Mon, 28 Oct 2024 20:20:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/986">@Fehr</a></p>
<p dir="auto">with an update function that retrieves the entire string that needs to be sent, I finally managed to transfer the desired number to the GUI display.</p>
<p dir="auto"><img src="https://i.imgur.com/oRrjThz.png" alt="f0570429-717f-4554-a5d9-d8f0a8ede516-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The following string is displayed on the Arduino console:</p>
<p dir="auto"><img src="https://i.imgur.com/QyZheNp.png" alt="bb3d0bbc-b64c-4bc2-a93b-6b81142ead68-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">And the desired numbers values are now finally visible in the GUI:</p>
<p dir="auto"><img src="https://i.imgur.com/qjoYPYQ.png" alt="9b5e94ed-a49b-428c-9ee1-da5759de2777-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Basically, it works. However, my question now is is there no easier way to achieve the same result? Thank you very much for your feedback and regards.<br />
Fehr</p>
]]></description><link>https://forum.gui-o.com/post/909</link><guid isPermaLink="true">https://forum.gui-o.com/post/909</guid><dc:creator><![CDATA[Fehr]]></dc:creator><pubDate>Mon, 28 Oct 2024 20:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Mon, 28 Oct 2024 19:38:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a> said in <a href="/post/906">How to display a float number via bluetooth</a>:</p>
<p dir="auto">Hi kl3m3n, thank you very much for the quick reply.</p>
<p dir="auto">Unfortunately, my char array variable is still not output correctly in the following example. I am currently using an ESP32 as test hardware.</p>
<p dir="auto"><img src="https://i.imgur.com/oTUNxm8.png" alt="571ba2f2-dd9e-404f-8a7f-6d6c0682d926-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I can now generate a correct string with the snprintf function. This is confirmed by the following console output.</p>
<p dir="auto"><img src="https://i.imgur.com/EHVFiXY.png" alt="ba9c6102-f598-41ce-a1f4-58f4f075eec9-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">In the GUI display, however, the variable name is still displayed instead of the content of the char array. This is actually my general question, how do I have to pass the content of a string variable (char array) correctly so that I get the same output in the GUI as on the console?</p>
<p dir="auto"><img src="https://i.imgur.com/ncEFjTf.png" alt="f3488234-5e8d-4cb9-95f1-95362e141b02-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thank you very much for your support.<br />
Regards Fehr</p>
]]></description><link>https://forum.gui-o.com/post/908</link><guid isPermaLink="true">https://forum.gui-o.com/post/908</guid><dc:creator><![CDATA[Fehr]]></dc:creator><pubDate>Mon, 28 Oct 2024 19:38:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Sun, 27 Oct 2024 21:59:57 GMT]]></title><description><![CDATA[<p dir="auto">Good morning,<br />
In the initialization script, simply define a Label:<br />
|LB UID:your_label X:95 Y:96 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0000'".<br />
and write from your program In this Label "your_label " in the form of a string.<br />
I don't know in C but with  Bascom:<br />
Dim Float as single      //float variable<br />
Float=3,414       // Float value<br />
Dim Value as string *10        // declare Value as string<br />
Value=Str(Float)      // convert in string<br />
Print "@your_label  TXT:" ; Value ; "       // print in your_label<br />
and there you have it!<br />
It works via Bluetooth or Wifi, it doesn't matter.<br />
Bernard</p>
]]></description><link>https://forum.gui-o.com/post/907</link><guid isPermaLink="true">https://forum.gui-o.com/post/907</guid><dc:creator><![CDATA[Bernard]]></dc:creator><pubDate>Sun, 27 Oct 2024 21:59:57 GMT</pubDate></item><item><title><![CDATA[Reply to How to display a float number via bluetooth on Sun, 27 Oct 2024 21:50:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/986">@Fehr</a><br />
Hi!</p>
<p dir="auto">Glad to have you on-board the GUI-O enthusiasts! <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=e84f1c759a8" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":slightly_smiling_face:" alt="🙂" /></p>
<p dir="auto">You can use a label widget for displaying any kind of text/numeric values.</p>
<p dir="auto">After connecting over Bluetooth, you can create a label by sending a string:</p>
<pre><code>"|LB UID:my_label X:50 Y:50 TXT:\"&lt;your float as string&gt;\"\r\n"
</code></pre>
<p dir="auto">The \ before the double quotes is an escape sequence, so that double quotes are properly interpreted within the command.</p>
<p dir="auto">You can build this command by using "snprintf" on a char buffer (this is a c/c++ language standard library function).</p>
<p dir="auto">You can check out the examples here:<br />
<a href="https://www.gui-o.com/examples" rel="nofollow ugc">https://www.gui-o.com/examples</a></p>
<p dir="auto">Also, the manual describes the label (and other widgets) in more detail. You can download tge manual cia the GUI-O app or from GUI-O website.</p>
<p dir="auto">If you need any additional information or help, feel free to ask.</p>
<p dir="auto">Best regards,<br />
Kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/906</link><guid isPermaLink="true">https://forum.gui-o.com/post/906</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Sun, 27 Oct 2024 21:50:12 GMT</pubDate></item></channel></rss>