<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with asfloatbuffer() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=asfloatbuffer%28%29</link>
      <pubDate>Sun, 08 Aug 2021 20:17:06 +0000</pubDate>
         <description>Tagged with asfloatbuffer() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedasfloatbuffer%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>How do I read an array of doubles from arduino to processing?</title>
      <link>https://forum.processing.org/two/discussion/26570/how-do-i-read-an-array-of-doubles-from-arduino-to-processing</link>
      <pubDate>Wed, 28 Feb 2018 03:08:54 +0000</pubDate>
      <dc:creator>MitchR</dc:creator>
      <guid isPermaLink="false">26570@/two/discussions</guid>
      <description><![CDATA[<p>So I have code, which prints out an 8x8 array of doubles into the serial port in Arduino (live updated from sensor). How do I get processing to read these into its own array? I have an array globally defined as</p>

<p>float[][] array = new float[r][c]</p>

<p>where r and c are how many rows and columns there are. How do I turn this into an array that gets live updated from the serial port? If any more info is needed I will be happy to provide it, thanks!.</p>
]]></description>
   </item>
   <item>
      <title>Transmission of a float through a serial link</title>
      <link>https://forum.processing.org/two/discussion/12757/transmission-of-a-float-through-a-serial-link</link>
      <pubDate>Wed, 30 Sep 2015 19:28:48 +0000</pubDate>
      <dc:creator>jmeuf</dc:creator>
      <guid isPermaLink="false">12757@/two/discussions</guid>
      <description><![CDATA[<p>Hi everybody,</p>

<p>I am trying to send a float through a USB link between an Arduino and a Processing (ver 3) application.</p>

<p>On the Arduino, I am breaking the float with a union before sending the 4 chars:</p>

<p>`union _UVAL {
  float f;
  char c[4];
} uval;</p>

<p>`</p>

<p>That's the easy part!</p>

<p>Now I am trying to reconstruct the float under Processing knowing that Processing doesn't handle the union, the pointer, the bitwise shift (&lt;&lt;, &gt;&gt;), etc.</p>

<p>As an example, <strong>1.0</strong> is encoded as '63 128 0 0' (or in hexa: 3F 80 00 00). You can check on the IEEE754 web site:</p>

<p><a href="http://www.h-schmidt.net/FloatConverter/IEEE754.html" target="_blank" rel="nofollow">http://www.h-schmidt.net/FloatConverter/IEEE754.html</a></p>

<p>With the 4 bytes received and coded as chars, can you please provide a way to retrieve the float.</p>

<p>Thank you very much in advance.</p>

<p>JM</p>
]]></description>
   </item>
   </channel>
</rss>