[PD] gpio on the raspberry pi from within pd ?

Charles Goyard cg at fsck.fr
Mon Jan 28 15:14:05 CET 2013


Hi list,

I could make use of gpio (as output) within pd with just [textfile] :

on the command-line:

echo gpio17 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio17/direction
chown charles /sys/class/gpio/gpio17/value

inside pd:

[ set 1 (  [ write /sys/class/gpio/gpio17/value cr (
|
[ textfile ]

works.


I use it to drive a light system from a track of a audio file containing
only square waves at a given frequency (say, cues embedded inside an
audio file).

I basically snapshot~ and see if it's over or below 0, and turn the gpio
on/off on change.

I started using pd on the pi three hours ago and have it playing audio and
banging the gpio in no time.

Thanks to all for this wonderful community.

I'm very happy ;).


-- 
Charles



More information about the Pd-list mailing list