Fun with the Diamond's tilt sensor (7/2/2008 4:32 pm)
Filed under: Windows Mobile
I spent a couple of sleepless hours last night writing a little Sensor Test for my new HTC Diamond. It's a small app that lets you move a circle around the screen by tilting the device.
Exciting, eh? Well, the fun is in getting it to work. I asked HTC if they provide a development kit (SDK) for the tilt sensor, and they said "No", so I had to figure it out myself by digging around (and trying to remember what I knew of ARM assembly). I'm just happy I managed to figure it out, and so others can write interesting games with it, I'm giving the source code to what I figured out away. Have fun, create something with it.
You can download Sensor Test here, it's the small app I describe, along with the project necessary to compile it. You'll need Visual Studio 2008 and the WM 6.0 SDK to compile it yourself, though if you're a Windows Mobile developer, I suspect you'll only need to see the top of the main code file and the first couple of functions to figure things out.
I'm going to work on a little game idea I have, but with the way I bounce from one project to the next, don't be surprised if it takes me a while.
Edit: 7/3/2008 7:51 am I added a bit more information to the struct of data, I still can't figure out one field