Node.js Bit Operations

September 12, 2013

I was working on trying to get the barometer readings from my TI SensorTag using Node.js when I came across this problem. See, the user's guide has two code examples for the algorithm for the pressure - one in C, and one in Java. The one in C uses primarily bit shift operations, whereas the one in Java uses Math.pow() to do the same thing. Naturally, I tended towards the bit shift operations since it makes the code a bit clearer as to what it's doing (ultimately, from a performance perspective, it doesn't matter since Math.pow(2,


Published Bluetooth LE Module

September 11, 2013

Well, I published my Node.js module for Bluetooth LE, btle.js (pronounced "Beetle Juice") to npm. Even though it's labeled version 0.1.0, it's got most of the functionality that's necessary for Bluetooth LE - reading attributes, writing commands and requests, and listening for notifications. I'm hoping to add more functionality over the next few weeks/months.

The main reason I was doing this was to get my TI SensorTag working with my Raspberry Pi and Bluetooth LE dongle, which it now does. I've even got the beginnings of a Node.js module for the sensortag, sensortag.js


TI SensorTag

May 12, 2013

I got my TI Bluetooth SensorTag Friday, and played with it some over the weekend. It's pretty nice. It's basically a small device with a bunch of embedded sensors on it - accelerometer, gyroscope, ambient temp, IR temp (see below), humidity, barometric pressure, and a couple of buttons on it. It's very small, and communicates over Bluetooth 4 LE. You can download an iOS app for viewing the data, so my daughters and I played with it some. Pretty cool. There's a teardown of it at MAKE magazine, and even a Raspberry Pi project to interface with it. W00t!!!