[PD] gpio on the raspberry pi from within pd ?
Jack
jack at rybn.org
Thu Feb 14 18:50:06 CET 2013
Le 14/02/2013 18:41, João de Brito Rocha Reis Vidigal a écrit :
> Charles:
>
>> 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.
> could I do the reverse here? I mean, use it as an input rather than an output?
> would it be something like:
>
> echo gpio17 > /sys/class/gpio/import
> echo in > /sys/class/gpio/gpio17/direction
> chown charles /sys/class/gpio/gpio17/value
>
> inside pd:
>
> [ set 1 ( [ read /sys/class/gpio/gpio17/value cr (
> |
> [ textfile ]
>
>
> tks
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Replacing "charles" (after chown) by your user and [set 1( by [rewind,
bang( should work.
++
Jack
More information about the Pd-list
mailing list