OSC to raspberry pi GPIO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nonmateria 781d95267e cleanup 1 year ago
bin renamed to gpiosc 1 year ago
src cleanup 1 year ago
.clang-format initial version 1 year ago
.gitignore initial version 1 year ago
LICENSE.md improves readmes 1 year ago
Makefile initial version 1 year ago
README.md renamed to gpiosc 1 year ago



Utility to receive OSC messages to control rasperry pi's GPIO pins. Usage:

gpiosc [port] [address]

address is optional and it will default on reacting to incoming message on /gpio.

Received OSC messages should have two int argument: the first is the GPIO number to address (any number from 1 to 27 is valid) and the second is the value to set (any value greater than 0 will be treated as HIGH, the others as LOW). As soon as a message for a pin is received the first time, that pin mode is set to OUTPUT.

To quit the program you can use SIGINT by pressing CTRL+C or sending a SIGTERM with another console with killall gpiosc.


you need liblo installed (included dev packages) in your system, then you build with make, for example on raspbian you could get everything you need like this

sudo apt-get install build-essential
sudo apt-get install liblo7 liblo-dev
git clone https://git.sr.ht/~npisanti/gpiosc
cd gpiosc 

then you will have an executable in bin/gpiosc.

To build in debug mode, you should make clean first and then make debug, the output executable will have the same name.


This is directly writing at the BCM2835 memory address, and it's tested just by using all the pins as digital I/O, i'm not responsible of any damage this program could do to any device connected to the GPIO that needs to be treated differently, for example LCD displays.

thanks to

This lecture and some of this code.


Nicola Pisanti, MIT License 2020