<p dir="ltr">Forgot to mention if you use k12 educational module abstractions (you can start k12 mode by adding -k12 startup flag to pd-l2ork in which case your would have UI like this: <a href="http://l2ork.music.vt.edu/main/wp-content/uploads/2014/03/pd-l2ork-k12-rpi-003.png">http://l2ork.music.vt.edu/main/wp-content/uploads/2014/03/pd-l2ork-k12-rpi-003.png</a> ), then you can access either gpio or spi via a single object.</p>

<p dir="ltr">And while we are talking about start-up flags you can also explore -unique startup flag which allows you to open new patches in a new instance of the pd-l2ork (by default they are opened in the existing instance so double-clicking on a bunch of pd patch documents will not spawn a bunch of instances).</p>

<p dir="ltr">HTH</p>
<div class="gmail_quote">On Mar 24, 2014 1:08 PM, &quot;Ivica Ico Bukvic&quot; &lt;<a href="mailto:ico@vt.edu">ico@vt.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal">Hi Ivica, <u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I was working on a small external for MCP3008 using wiring pi, but I&#39;d love to try yours if it is possible. Will it be possible to use it as an external like gpio with vanilla? are you using wiring pi for this?<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">There is nothing in those externals to prevent them from being used in vanilla. They can be found in the &lt;root git&gt;/l2ork_addons/raspberry_pi/disis_gpio and disis_spi folders (latter is the MCP3008 one). Spi one does not rely on wiring pi. AFAIK wiringpi does not offer spi support but I could be wrong.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
Also, how are you getting the multiple pwm streams?<u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I partially rely on wiringpi inside disis_gpio for software pwm on all pins (I say partially because wiringpi can only create a new thread for software pwm but does not offer ability to close the thread other than exiting the program, which is not an option for an environment like pd). So, each opened pin will have a separate high priority thread that gives you a 1000Hz PWM. disis_gpio also supports hardware pwm on pin 18 and that one has some kind of a logarithmic curve and as such behaves distinctly different but I simply did not want to go into anything higher than 1000Hz as that would choke the cpu.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">HTH <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p></div><div><p class="MsoNormal">best,<u></u><u></u></p></div><div><p class="MsoNormal">
<u></u> <u></u></p></div><div><p class="MsoNormal">J<u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">
On Mar 20, 2014, at 1:16 PM, Ivica Ico Bukvic &lt;<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>&gt; wrote:<u></u><u></u></p></div><p class="MsoNormal"><br><br><u></u><u></u></p><div><div><p class="MsoNormal">
On 03/20/2014 12:37 PM, David Medine wrote:<u></u><u></u></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal">FYI<br><br>There is also a RPi GPIO object for Pd by Miller Puckette here:<a href="http://msp.ucsd.edu/syllabi/206.13w/index.htm" target="_blank"><br>
http://msp.ucsd.edu/syllabi/206.13w/index.htm</a><br><br>and the  same code with a makefile and build for UDOO here:<a href="https://github.com/cmuartfab/Udoo/tree/dem-rev/puredata/gpio" target="_blank"><br>https://github.com/cmuartfab/Udoo/tree/dem-rev/puredata/gpio</a><br>
<br>I did see the note from garthz about the architecture collisions. I will attend to this. Anyway, make sure to use the gpio.l_arm version -- just delete the other two to avoid problems.<u></u><u></u></p></div></blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>Indeed, disis_gpio is loosely based on gpio. It however also offers things that gpio (AFAIK) doesn&#39;t, like multithreaded pusle-width-modulation (hardware on pin 18 and software on all pins) with an Arduino-like 0-1023 range. disis_spi is a completely new beast that allows interfacing with MCP3008 AD converter and provides up to 8 analog input channels that can provide high-resolution streams with values 0-1023. So, pd-l2ork externals essentially look to provide an Arduino-like environment.<u></u><u></u></p>
</div><p class="MsoNormal">_______________________________________________<br><a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p></div></div></blockquote></div>