Example OSC data streaming code for the Bare Conductive Pi Cap. Streams touch and proximity data from the Pi Cap to a network target (default is 127.0.0.1) via OSC on a specified port (default is 3000). The target can be an IPv4 address or a hostname - but not an IPv6 address at this time. Can optionally interface with Bare Conductive's MPR121 grapher.
- Requires python-dev (
apt-get install python-dev
) - Requires WiringPi (
apt-get install wiringpi
) - Requires Bare Conductive's MPR121 libary for WiringPi
- Requires python-liblo (
apt-get install python-liblo
)
- You should install this code as part of the Pi Cap Raspbian package:
sudo apt-get install picap
- However, if you are doing this yourself, clone the repository and follow the usage instructions.
Sends Pi Cap readings through OSC - MUST be run as root.
Usage: python datastream-osc.py [OPTION]
Options:
-h, --host host address, defaults to 127.0.0.1
-p, --port port on which to send, defaults to 3000
--help displays this message
/touch electrode touch values (0 not touched, 1 touched)
/tths electrode touch thresholds (0..255)
/rths electrode release thresholds (0..255)
/fdat electrode filtered data (0..1023)
/bval electrode baseline values (0..1023)
/diff /bval - /fdat (0..1023)