Hi,
I have heard that it is complicated to get Raspberry Pi's general purpose i/o pins to work with Pd, to the point where one should try to find another solution. Is this really so? :/ Or, where can I find out about this?
Thanks.
Raspberry Pi GPIO and PureData? Does it work?
Hi,
I have heard that it is complicated to get Raspberry Pi's general purpose i/o pins to work with Pd, to the point where one should try to find another solution. Is this really so? :/ Or, where can I find out about this?
Thanks.
@cfry It had worked in the past (32-bit extended +RPI2B + wiringPI) and can probably work now (vanilla + comport / python).
It is complicated by the variables introduced.
Bits.... 32/64
Pd versions and available externals.
RPI versions and OS choices.
For example wiringPI was broken for 64-bit RPI3 last year, but is maybe working again now?
I am controlling my gpio pins directly on RPI3 with direct messages now (not in Pd but it is probably possible)....... like.....
os.execute("gpio write 25 0");
where "os" is in the standard lua library.
I am still a Linux noob....!
I have a startup file that sets the pins as I want them.......
#! /bin/bash
gpio mode 17 output
gpio mode 27 output
gpio mode 18 output
gpio mode 22 output
gpio write 22 1
gpio mode 23 output
gpio write 23 1
gpio mode 25 output
gpio write 25 1
gpio mode 24 output
gpio write 24 1
exit 0
And I understand that Pd can do this through [shell] but I don't know which library that is in......?
For reading the pins...... Adafruit retro games...... https://forum.pdpatchrepo.info/topic/11564/how-to-use-disis_gpio-for-rpi-button-input-alternatives/3
David.
@whale-av Hm, I get the picture. Then it should be easier to use an Arduino connected to the pi I understand. Would Pduino and Purr Data work on a pi?
(What I need to do in the input side is measure the conductivity/resistance of people)
[shell] is ggee library
There is a eurorack module called Terminal Tedium. it is based on RPI + a shield. It is able to use Pd (as well as Csound).
All the code for reading the GPIO of the RPi is available on github.
GitHub link
Hope this helps
Yes it works very well. I own 2 of them. It also react very well with OSC protocol. I made a Drum machine based on it:
The interface is on my main PC developed in Python + WxPython and the Terminal module is in my rack.. I have a fully flexible drum machine. I can share the patch + code if anyone is interested.
@JMC64 said:
Terminal Tedium
Hey thanks that is great to know. I am starting a new project in a week and it would be cool to check out if I could use this setup. I will need around 10 digital switches, maybe and/or analog input.
I have a pd 0.49 (self compiled) and wiring pi working in a project with Raspbian Stretch in RPi2 3B+.. But to make wiring Pi work well you will need to run puredata in root mode..
Works like a charm..!
So is there some snippets of (python) code and a pd patch I can copy and just start working, migrate my arduino-pd projects to raspberry pi instantly?
How many digital and analog inputs can I expect to get from the rp gpi?
@JMC64 said:
Yes it works very well. I own 2 of them. It also react very well with OSC protocol. I made a Drum machine based on it:
The interface is on my main PC developed in Python + WxPython and the Terminal module is in my rack.. I have a fully flexible drum machine. I can share the patch + code if anyone is interested.
Hi, I am exploring this now, looking at the terminal tedium code.
I wish to accomplish a very simple thing, just add a PIR sensor and get the reading in to Pd.
However I would like to add this function to an existing RPI OS (Patchbox Os) already set up to run a specific Pd patch using a multichannel USB card and I am a bit worried that if I just dive in and follow the instructions for setting up tedium on linux I will mess up the OS configuration.
Could you give me a hint on where to start?
@emviveros Looking at WiringPi, it seems good but how do you get it to talk with Pd?
@cfry WiringPi is deprecated due to too much pressure from its audience to its developer (actually bullying). I don't think it will be very easy to use it. You can try Python (check Sparkfun's tutorials) or even the [gpio] object (I think that's what it's called) which is by Ivica Ico Bukvic, I think.
Oops! Looks like something went wrong!