[PD] GPIO, mcp3008 and Raspbian

Ivica Bukvic ico at vt.edu
Mon Mar 24 23:02:11 CET 2014


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:
http://l2ork.music.vt.edu/main/wp-content/uploads/2014/03/pd-l2ork-k12-rpi-003.png),
then you can access either gpio or spi via a single object.

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).

HTH
On Mar 24, 2014 1:08 PM, "Ivica Ico Bukvic" <ico at vt.edu> wrote:

>
>
> Hi Ivica,
>
>
>
> I was working on a small external for MCP3008 using wiring pi, but I'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?
>
>
>
> There is nothing in those externals to prevent them from being used in
> vanilla. They can be found in the <root
> git>/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.
>
>
>
>
>
> Also, how are you getting the multiple pwm streams?
>
>
>
> 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.
>
>
>
> HTH
>
>
>
> best,
>
>
>
> J
>
>
>
>
>
>
>
> On Mar 20, 2014, at 1:16 PM, Ivica Ico Bukvic <ico at vt.edu> wrote:
>
>
>
> On 03/20/2014 12:37 PM, David Medine wrote:
>
> FYI
>
> There is also a RPi GPIO object for Pd by Miller Puckette here:
> http://msp.ucsd.edu/syllabi/206.13w/index.htm
>
> and the  same code with a makefile and build for UDOO here:
> https://github.com/cmuartfab/Udoo/tree/dem-rev/puredata/gpio
>
> 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.
>
>
> Indeed, disis_gpio is loosely based on gpio. It however also offers things
> that gpio (AFAIK) doesn'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.
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140324/1d2b64c0/attachment.htm>


More information about the Pd-list mailing list