|nonmateria d5a222afd1||10 months ago|
|hardware||11 months ago|
|src||10 months ago|
|.clang-format||10 months ago|
|.gitignore||11 months ago|
|LICENSE.md||11 months ago|
|Makefile||10 months ago|
|README.md||11 months ago|
This is a system composed by a shield to mount on the raspberry pi and a server application for translating piezo sensors signals into OSC messages.
-i [destination IP] : sets the destination IP address, localhost if not given -p [destination port] : sets the destination port. This is mandatory to set. -a [destination address] : sets the destination OSC address. defaults to /piezo -p [piezos options] : sets the active piezos and range, see below -u [usec sleep] : sets the delay in the main loop in usec, defaults to 500 -v [verbose] : activate a verbose output, doesn't need any argument
-p option you can give a list of number from 0 to 5, to activate the correlated sensors, optionally you can add some
: to set ranges, value outside the ranges won't be sent. For example:
rpiezos -p 12345 -s 012345
sends all the sensors values to localhost:12345
rpiezos -i 192.168.0.44 -p 3333 -s 01:10:512
sends sensors 0 and 1 values to 192.168.0.44:3333, only if the values are from 10 to 512
rpiezos -a /test -p 3333 -s 2:10:1024 -s 3:5:1024
sends messages to localhost:3333, at the OSC address /test, sends just the values from 10 to 1024 of sensor 2 and from 5 to 1024 of sensor 3.
The messages will be sent to the set address (default to
/piezo) and they will have two arguments: an int for the sensor number and a normalized float for the signal value (low-high 10 bit range is remapped to 0.0f <--> 1.0f ).
First, remember to enable SPI with
sudo raspi-config or by putting
dtparam=spi=on into your
Then you need
liblo installed (included dev packages) in your system, then you can build with make.
On raspian buster for example:
sudo apt-get install build-essential sudo apt-get install liblo7 liblo-dev git clone https://git.sr.ht/~npisanti/rpiezos cd rpiezos make
then you will have an executable in
For more info on how to build the hardware, go to the hardware readme.
Dario Longobardi's ofxGPIO, most of the code is ported from the
Nicola Pisanti MIT License 2020.