Windows Phone @ MoDaCo: The HTC Touch Diamond accelerometer... wide open - Windows Phone @ MoDaCo

Jump to content

Galaxy Nexus Review
We put the Galaxy Nexus and Ice Cream Sandwich through their paces.

Google Music Launch
Google bring Music out of beta and launch their music store.

MoDaCo Plus / Ad Free
Hate ads? Want cool stuff? Sign up for a MoDaCo Plus / MoDaCo Ad Free account with Online Kitchen access!

Close
Open
Close
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

The HTC Touch Diamond accelerometer... wide open
-----


#1 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,271
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 09 July 2008 - 02:07 PM

Looking to implement support for the HTC Diamond accelerator in your native or managed applications? Now you can!

The breakthrough is thanks to Scott Seligman at ScottAndMichelle.net...

Quote

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.

...

I've added some code to show how to get notifications in an event-driven model from the tilt-sensor on the diamond to my Sensor Test project. The amount of information you can get out of this is very limited, only the current side of the device that's "up", but it's useful for some apps. For instance, this is what Opera uses on the device to sense when it needs rotation without reverting to polling the tilt sensor a few times a second

If you're a native developer, Scott's page is probably the place you want to start to implement accelerometer support in your own application. If - like me - you are a developer in nice fluffy managed code land then do not despair, Koushik Dutta has created a managed wrapper for Scott's work! The wrapper exposes some very intuitive methods, as well as an event driven framework for when the device's orientation changes... SWEET!

You can find Koushik's work here.

I'm definitely looking forward to seeing cool applications hitting the streets using these libraries, and i'm definitely trying to think how to support into my own projects! :D

P

[Via: wmpoweruser]

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0

Sponsored Links


#2 User is offline   ~Rob 

  • Regular
  • PipPip
  • Group: Members
  • Posts: 100
  • Joined: 07-July 08
  • Devices:M3100

Posted 09 July 2008 - 04:34 PM

I wanted to start coding for WM in my spare time. This looks like something to remember

0


#3 User is offline   l3v5y 

  • Diehard
  • PipPipPipPip
  • Group: MoDaCo Plus
  • Posts: 312
  • Joined: 15-April 08
  • Gender:Male
  • Location:Bristol!
  • Devices:HTC Prophet, Diamond, HD2
  • Twitter:@l3v5y

Posted 09 July 2008 - 06:38 PM

I sent an email to HTC about the SDK, they haven't replied yet (I sent it over a week ago), but someone has made progress!
:D

Now to try and add this to FSD, my only real program...

Posted Image
HTC Prophet - WM6.5.1 23081
HTC Touch Diamond - WM6.5.3 Light (28014)
HTC Leo - Getting repaired - WM6.5.3 (28014)

Cooking is easier with devices ;)

Twitter
0


#4 User is offline   Nick Brunch 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 07-March 08
  • Devices:SPRINT Mogul (Titan)

Posted 17 November 2008 - 03:03 AM

I wrote this software which uses the HTC diamond's accelerometer and light sensor. Check this out : http://nishantpant.wordpress.com/2008/11/1...-touch-diamond/


View PostPaul (MVP), on Jul 9 2008, 08:07, said:

Looking to implement support for the HTC Diamond accelerator in your native or managed applications? Now you can!

The breakthrough is thanks to Scott Seligman at ScottAndMichelle.net...


If you're a native developer, Scott's page is probably the place you want to start to implement accelerometer support in your own application. If - like me - you are a developer in nice fluffy managed code land then do not despair, Koushik Dutta has created a managed wrapper for Scott's work! The wrapper exposes some very intuitive methods, as well as an event driven framework for when the device's orientation changes... SWEET!

You can find Koushik's work here.

I'm definitely looking forward to seeing cool applications hitting the streets using these libraries, and i'm definitely trying to think how to support into my own projects! B)

P

[Via: wmpoweruser]

0


Sponsored Links

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2012. MoDaCo uses IntelliTxt technology. Privacy Policy / Contact Details.

Skin and Language

Sign in here


Sign in options
Log in with Facebook Log in with Twitter   Go to advanced login Register Now!