RNBO - Access Raspberry GPIO

Benway's icon

Is it possible to access the Raspberry GPIO without modifying the RNBO generated C++ code?

thetechnobear's icon

not directly in RNBO, as it has no access to hardware.

your best bet, would be to write another rPI process that accesses GPIO , which then sends osc messages (or similar) to your RNBO process.

lysdexic's icon

Great question! I wrote a series of articles for C74 covering GPIO integration on the Raspberry Pi with RNBO. These should help you get started with extended work on the Raspberry Pi target.

https://rnbo.cycling74.com/learn/working-with-photoresistors-ldrs-on-the-raspberry-pi-with-rnbo

bacha's icon

Hey folks, I'm currently trying to build a sequencer in RNBO that sends out signal via rPi GPIO to light up a bunch of LEDs. If I understand correctly from the above, this is something inherently impossible to achieve with RNBO in its current state, without needing to write the runner, correct?

I'm not familiar with python to that extent unfortunately. Would be extremely grateful for any help or pointers to what to do here.

Alex Norman's icon

Hi Bacha!

You are correct, the RNBO runner that we use on the RPI does not have code that interfaces with the GPIO. You'd have to write that part yourself. You can use outport and/or param to let your patch indicate your GPIO intentions, then custom software listening to that (via UDP/OSC or websocket/OSC) that interfaces with the GPIO.

bacha's icon

Thanks for the reply! I actually managed to make some progress with this tutorial: https://www.lysdexic.com/light-up-some-leds-with-rnbo-on-the-raspberry-pi/, which is the same one as the one in the official docs, but there is a right parenthesis missing, which yields an unexpected EOF error (in case someone sees this and can fix it :)