<?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[reading data from Arduino using comport]]></title><description><![CDATA[<p>Hi,<br />
I have few analog data coming from arduino over the serial. I would like to use those values inside pure data. How can I get those numbers using the comport objects?<br />
Is there any tutorial on the above?</p>
<p>Thanks!</p>
<p>edit: I understand I should use zl group and another external object called &quot;iem_alisttosym&quot;<br />
I download the iem externals but for some reason that object is dashed out.</p>
<p><img src="/uploads/files/1661961930792-screen-shot-2022-08-31-at-19.03.45.png" alt="Screen Shot 2022-08-31 at 19.03.45.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 15:14:21 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/14049.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Aug 2022 16:01:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to reading data from Arduino using comport on Wed, 31 Aug 2022 16:05:33 GMT]]></title><description><![CDATA[<p>Hi,<br />
I have few analog data coming from arduino over the serial. I would like to use those values inside pure data. How can I get those numbers using the comport objects?<br />
Is there any tutorial on the above?</p>
<p>Thanks!</p>
<p>edit: I understand I should use zl group and another external object called &quot;iem_alisttosym&quot;<br />
I download the iem externals but for some reason that object is dashed out.</p>
<p><img src="/uploads/files/1661961930792-screen-shot-2022-08-31-at-19.03.45.png" alt="Screen Shot 2022-08-31 at 19.03.45.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Wed, 31 Aug 2022 16:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Wed, 31 Aug 2022 16:37:06 GMT]]></title><description><![CDATA[<p>You can try the abstractions [serial_print] and [serial_write] I made a while back. They facilitate the communication between the Arduino and Pd quite a lot. There're here <a href="https://github.com/alexdrymonitis/Arduino_Pd" rel="nofollow">https://github.com/alexdrymonitis/Arduino_Pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/2</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Wed, 31 Aug 2022 16:37:06 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Wed, 31 Aug 2022 17:00:43 GMT]]></title><description><![CDATA[<p>I should place it inside the external folder?</p>
<p>I did the above and it seems pd is not recognize the object</p>
<p><img src="/uploads/files/1661965223170-screen-shot-2022-08-31-at-20.00.11.png" alt="Screen Shot 2022-08-31 at 20.00.11.png" class="img-responsive img-markdown" /></p>
<p>btw - will it work also in pd running on raspberry pi?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/3</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Wed, 31 Aug 2022 17:00:43 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Wed, 31 Aug 2022 17:55:13 GMT]]></title><description><![CDATA[<p>Assuming I will manage to make your object work in my Pd.<br />
Will I be able to use the route object such in Max?</p>
<p><img src="/uploads/files/1661968510517-screen-shot-2022-08-31-at-20.54.28.png" alt="Screen Shot 2022-08-31 at 20.54.28.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/4</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Wed, 31 Aug 2022 17:55:13 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 04:39:13 GMT]]></title><description><![CDATA[<p>You have to place the abstraction somewhere where Pd will look for it. Either use a <code>[declare -path /path/to/abstraction]</code> object within your patch, or set the path of the abstraction to Pd's search path via Pd's preferences.<br />
As for the <code>[route]</code>, yes, you can use it. But you can also use a <code>[send]</code>/<code>[receive]</code> pair. Just check the help patch to see how it works.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/5</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Thu, 01 Sep 2022 04:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 05:08:40 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/alexandros">@alexandros</a></p>
<p>edit: I fixed it by make another path to that specific folder where the serial_print object is located at..</p>
<p>I did so and still get an error of &quot;unknown declaration&quot;</p>
<p><img src="/uploads/files/1662007904187-screen-shot-2022-09-01-at-7.50.35.png" alt="Screen Shot 2022-09-01 at 7.50.35.png" class="img-responsive img-markdown" /></p>
<p><img src="/uploads/files/1662007950498-screen-shot-2022-09-01-at-7.51.54.png" alt="Screen Shot 2022-09-01 at 7.51.54.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/6</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Thu, 01 Sep 2022 05:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 05:28:08 GMT]]></title><description><![CDATA[<p>So I manage to have the serial_print object to work!</p>
<p>The think I don't understand</p>
<p>while in arduino it printed to the serial as the following:</p>
<p><img src="/uploads/files/1662008825007-screen-shot-2022-09-01-at-8.06.52.png" alt="Screen Shot 2022-09-01 at 8.06.52.png" class="img-responsive img-markdown" /></p>
<p>How can I receive the exact same print I have in the arduino serial from your serial_print object?<br />
It seems it separate the symbol to the right outlet and the integers/floats to the left. I can't get them together exactly as it printed to the serial?</p>
<p>in pd the print looks like this:</p>
<p><img src="/uploads/files/1662008840538-screen-shot-2022-09-01-at-8.05.39.png" alt="Screen Shot 2022-09-01 at 8.05.39.png" class="img-responsive img-markdown" /></p>
<p>pd printed only the numbers, without the string. Like the above I will not be able to route the data from different sensors. Why is that?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/7</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Thu, 01 Sep 2022 05:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 05:38:17 GMT]]></title><description><![CDATA[<p>OK! So I made it with the following method using pak object:</p>
<p><img src="/uploads/files/1662010679730-screen-shot-2022-09-01-at-8.37.34.png" alt="Screen Shot 2022-09-01 at 8.37.34.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/8</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Thu, 01 Sep 2022 05:38:17 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 10:23:53 GMT]]></title><description><![CDATA[<p>The point is to receive the values based on a tag, in this case &quot;value_ch0&quot;. Check the help patch to see how to use it either with [send] or with [route].</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/9</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Thu, 01 Sep 2022 10:23:53 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 16:35:05 GMT]]></title><description><![CDATA[<p>but how you do if I have more then 1 tag: for example:</p>
<p>value_ch0 ch0on value_ch1 ch1on value_ch2 ch2on</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/10</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Thu, 01 Sep 2022 16:35:05 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 01 Sep 2022 17:46:24 GMT]]></title><description><![CDATA[<p>You have to read the Arduino code that comes with the abstractions to understand. The tags are used to separate values or lists of values. If you want to send one value per tag you should do something like this:</p>
<pre><code>Serial.print(&quot;value_ch0 &quot;); // mind the white space after the tag name
Serial.println(value1); // I assume that 'value1' here is a variable that holds the value you want to send
Serial.print(&quot;value_ch1 &quot;);
Serial.print(value2);
</code></pre>
<p>Though this is rather cumbersome, it's better to do this in a loop, like this:</p>
<pre><code>for (int i = 0; i &lt; numCh; i++) {
  // construct a string like &quot;value_ch0 &quot;, &quot;value_ch1 &quot;, etc. using std::to_string from C++
  Serial.print(&quot;value_ch&quot; + to_string(i) + &quot; &quot;);
  Serial.println(values[i]); // this example assumes you have all your values in an array called &quot;values&quot;
}
</code></pre>
<p>But you could also use just one tag and send all your values under that tag and in Pd separate them with <code>[unpack]</code>. In this case the code would be something like this:</p>
<pre><code>Serial.print(&quot;values &quot;); // take care to include the white space
for (int i = 0; i &lt; numValues; i++) {
  Serial.print(values[i]);
  Serial.print(&quot; &quot;); //  print a white space to separate values
}
Serial.println(); // finally print the newline character to denote the end of the list
</code></pre>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/11</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Thu, 01 Sep 2022 17:46:24 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Wed, 14 Sep 2022 16:52:50 GMT]]></title><description><![CDATA[<p>So I have try to use the serial_print object in PD on my Raspberry Pi 2. I've downloaded the serial_print folder and placed it inside external folder in pd.</p>
<p>I've restart pd and reboot pi and the object is not recognized. I also try to add another path to that specific folder (in which the serial_print object is located) and still - object is not recognized.</p>
<p>Those adding external to pd on Raspberry pi is different process?</p>
<p>Thanks for any help!</p>
<p>edit:<br />
Ok, it bis working when specify the path to the folder within the externals.<br />
I don't know why the external folder itself (which is the default path) is not enough for recognizing the externals in that folder</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/12</guid><dc:creator><![CDATA[omer1789]]></dc:creator><pubDate>Wed, 14 Sep 2022 16:52:50 GMT</pubDate></item><item><title><![CDATA[Reply to reading data from Arduino using comport on Thu, 15 Sep 2022 06:00:47 GMT]]></title><description><![CDATA[<p>If you place the abstractions (it's not an object) inside a folder that is inside the externals folder, so /path/to/externals/Arduino_Pd/serial_print.pd, then you have to either specify the Arduino_Pd folder to Pd's search paths, or load the abstraction like this <code>[Arduino_Pd/serial_print]</code>, so <code>[name-of_folder/name_of_abstraction]</code>. Pd doesn't do a depth search, but only the directories specified in its search paths.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14049/reading-data-from-arduino-using-comport/13</guid><dc:creator><![CDATA[alexandros]]></dc:creator><pubDate>Thu, 15 Sep 2022 06:00:47 GMT</pubDate></item></channel></rss>