jakobwesthoff/node-l8smartlight — pull request #1 by tobmaster (2014-06-30 15:32:37+00:00)
Title: Accel

I added query accelerometer to the protocol.
Decoupled from the L8 lib I created a listener that is able to decode the accelerometer data and triggers easy to process events for shake, tap (broken in l8 FW) and general accel data.
The accel data contains also orientation, position and 3d accel coordinates (x,y,z)

```javascript
var accel = new Accel(l8, 500); // Create the listener and bind it to the l8

accel.on('accel', function(data) { console.log(data) } ); // get detailed accel data
accel.on('shake', function() { console.log('Twerk, twerk, twerk') } ); // get detailed accel data
accel.on('tap', function() { console.log('BANG') }); // currently disable cause l8 says always it has been tapped.

// Start the polling
accel.startWatch();