<?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[Arduino - Data Type]]></title><description><![CDATA[<p>Hi, I'm fairly new to arduino. I'm working on a PD patch that gets data out of an accelerometer (a MMA8451). It works fine, but I'd like to know something in order to improve things. The arduino code is very simple, it outputs data this way :<br />
<img src="/uploads/files/1495834722460-fora1.jpg" alt="fora1.jpg" class="img-responsive img-markdown" /><br />
So I get a stream of ascii values in Pure Data. I use 'a', 'b' and 'c' as arbitrary values in order to separate the x, y and z values in my patch. Just to convert my data into numeric values, I had to do this ugly piece of patch :<br />
<img src="/uploads/files/1495834959023-fora2.jpg" alt="fora2.jpg" class="img-responsive img-markdown" /><br />
There might be a more elegant way to do it, but my question is the following : is there a way to get numeric values directly out of arduino, so I get them directly with comport? A kind of list I would just have to unpack?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10761/arduino-data-type</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 01:45:10 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/10761.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 May 2017 21:47:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Arduino - Data Type on Fri, 26 May 2017 21:47:43 GMT]]></title><description><![CDATA[<p>Hi, I'm fairly new to arduino. I'm working on a PD patch that gets data out of an accelerometer (a MMA8451). It works fine, but I'd like to know something in order to improve things. The arduino code is very simple, it outputs data this way :<br />
<img src="/uploads/files/1495834722460-fora1.jpg" alt="fora1.jpg" class="img-responsive img-markdown" /><br />
So I get a stream of ascii values in Pure Data. I use 'a', 'b' and 'c' as arbitrary values in order to separate the x, y and z values in my patch. Just to convert my data into numeric values, I had to do this ugly piece of patch :<br />
<img src="/uploads/files/1495834959023-fora2.jpg" alt="fora2.jpg" class="img-responsive img-markdown" /><br />
There might be a more elegant way to do it, but my question is the following : is there a way to get numeric values directly out of arduino, so I get them directly with comport? A kind of list I would just have to unpack?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10761/arduino-data-type</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10761/arduino-data-type</guid><dc:creator><![CDATA[LucienR]]></dc:creator><pubDate>Fri, 26 May 2017 21:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to Arduino - Data Type on Sat, 27 May 2017 14:13:33 GMT]]></title><description><![CDATA[<p>The <code>Serial.write()</code> function writes raw bytes to the serial line. You can build your own protocol to receive and parse these values in Pd.<br />
I've made two vanilla abstractions, one that works with Arduino's <code>Serial.print()</code> and one that works with <code>Serial.write()</code>. You can get them here <a href="https://github.com/alexdrymonitis/Arduino_Pd" rel="nofollow">https://github.com/alexdrymonitis/Arduino_Pd</a><br />
There's one Arduino sketch for each abstraction explaining how to write your code in order for it to work with the corresponding abstraction.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/10761/arduino-data-type/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/10761/arduino-data-type/2</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Sat, 27 May 2017 14:13:33 GMT</pubDate></item></channel></rss>