Birthday Bluetooth
/It's my birthday today. I had my treat over the weekend and am now saving up for a Segway (just about doable) and a twenty acre estate that I can use it in (pretty much impossible). So I'm here in the office, eating chocolates and writing C#. Which counts as a pretty good situation in my book.
Anyhoo, I've been playing with a present I bought myself last week. It is a Texas Instruments SensorTag. You can pick these up for a very reasonable sixteen pounds or so and they are enormous fun (if you like connecting devices to sensors). It talks Bluetooth BLE and I've fancied having a go at this for a while.
Turns out to be easy to get it to connect to a Windows 8.1 device. Just remember that for Windows you have to pair the tag over Bluetooth. It just works with iOS and Android - I hope that they remove the need for pairing with Windows at some point.
If you fancy having a go I've written a very simple universal app and put it on GitHub. You can use this to connect to the accelerometer in a SensorTag and get events fired in your program when a new reading is produced.
I used a superb post from Dan Ardelean to get started, and just built a little wrapper class around methods that he described. Great fun.