The BlipBox uses a bespoke binary protocol to communicate (generally over a serial connection) to applications on the host computer. This protocol is implemented by easy-to-use BlipBox libraries, e.g. for Java and Processing. A C++ version is upcoming.
While the protocol is still evolving, an incomplete description can be found here.
Messages sent from BlipBox
variable length, 1-3 bytes
xy msg (3 bytes): 0101xxxx xxxxxxyy yyyyyyyy
4 bits msg id, 10 bits x, 10 bits y
release msg (1 byte): 01110000
sensor msg (2 bytes): 10ssssvv vvvvvvvv where ssss is 4 bits sensor id
16 possible sensors:
XY_SENSOR 0
RELEASE_SENSOR 1
TOUCH_SENSOR 2
POT_SENSOR 3
BUTTON1_SENSOR 4
BUTTON2_SENSOR 5
BUTTON3_SENSOR 6
parameter msg (2 bytes): 11ppppvv vvvvvvvv, where pppp is 4 bits parameter id
16 possible parameters
Messages sent to BlipBox
variable length, 1-3 bytes
first 4 bits is message type:
1 byte messages
clear : 00010000 / 0×10
follow mode: 4 bits marker type : 0010tttt
display effect: 4 bits effect type
shift leds: 2 bits direction, 2 bits steps (0: up; 1: down; 2: left; 3: right)
2 byte messages
configure sensors: bitmask setting sensors on/off – 12 bit sensor mask
configure fade time: 12 bits fade time or speed
write character message: 4 bits position, 8 bits character (fits in 7 or 6 bits?)
set parameter message: 1000ppvv vvvvvvvv (p: parameter ID, v: 10 bit value)
set 8 leds: 4 bits led offset, 8 bits values (on/off)
3 byte messages
set led: 4 bits marker type, 8 bits led index, 8 bits brightness
hold pos: same as set led when follow mode is on
parameters:
brightness: 0-255
sensitivity: 10 bit value
set led: led index/value
set cross/criss/blob: 4 bits type, 8 bits led index, 8 bits brightness
write letter: 4 bit direction/brightness, 8 bit position, 8 bit character code
set led row: 4 bits row index, 16 bits values
set led column: 4 bits column index, 16 bits values
set functional mode: blipbox/monome/faders…
todo: save configuration
discussion:
key change message sent from blipbox? nope
key change: 4 bits id, 4 bits empty, 8 bits new location
mode change message
also: key press/release/change messages
messages sent to blipbox:
would be nice if there were 3 one-byte messages with id’s in the first two bits (00xx)
then two-byte messages with id’s 01xx, three byte id’s 1xxx
marker types:
dot, square, star, cross, criss, horizontal line, vertical line, diag line tl-br / bl-tr
Java implementation:
enum MessageType, sub types SensorMessageType and Set/Get/ParameterMessageType
todo:
change button sensor to return all button data in one bitmap. or:
button msg (2 bytes): 100100kk bbbbbbbb
kk is 2 bit button bank
bbbbbbbb is 8 bit button bitmap
allows 8*4 buttons