Please Log In or Register - it's FREE!

 
Reply to this topicStart new topic
 The HTC Touch Diamond accelerometer... wide open
Paul
post Jul 9 2008, 14:07
Post #1


The Main Man!
Group Icon

Group: Admin Team
Posts: 24,394
Favorited Topics: 76
Joined: 6th November 2002
From: Norwich, UK
Member No.: 1

Device(s): Touch HD / G1
Twitter: @paulobrien



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! biggrin.gif

P

[Via: wmpoweruser]


--------------------
Follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

For Sale (Norfolk, UK) - 2007 (07) Mazda 6 MPS, 2.3 Turbo 4WD 256bhp / Black Mica / 20GB Bose / DVD Nav / K&N + much more, 47k miles - £9,995 - PM me for details

Go to the top of the page
 
+Quote Post
~Rob
post Jul 9 2008, 16:34
Post #2


Regular
Group Icon

Group: Posters
Posts: 99
Joined: 7th July 2008
Member No.: 405,142

Device(s): M3100



I wanted to start coding for WM in my spare time. This looks like something to remember
Go to the top of the page
 
+Quote Post
l3v5y
post Jul 9 2008, 18:38
Post #3


Diehard
Group Icon

Group: News Team
Posts: 330
Favorited Topics: 1
Joined: 15th April 2008
From: Bristol!
Member No.: 378,942

Device(s): HTC Prophet, Diamond, HD2
Twitter: @l3v5y



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!
smile.gif

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


--------------------

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
Go to the top of the page
 
+Quote Post
Nick Brunch
post Nov 17 2008, 03:03
Post #4


Newbie
Group Icon

Group: Posters
Posts: 5
Joined: 7th March 2008
Member No.: 364,949

Device(s): SPRINT Mogul (Titan)



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/


QUOTE(Paul (MVP) @ Jul 9 2008, 08:07) *
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! biggrin.gif

P

[Via: wmpoweruser]
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts Windows Mobile 6.5 is out for the i617
10 jznomoney 741 Today, 16:46
Last post by: darklordofthesith
No new Topic has attachmentsDiamond Hologram on omnia b7610
Has anyone got it working on his b7610?
17 kwemel 1,219 Today, 16:20
Last post by: passion_streak
No new WMPoweruser Series ROM for the Toshiba TG01
Trying to get a ROM going for you guys
32 Wen(WM) 1,149 Today, 16:41
Last post by: mkultr4
No New Posts Does removing the battery cover frequently damages it?
To soft reset and / or change microSD
7 Dan_Aykroyd 217 Today, 16:21
Last post by: Ender Psp
No New Posts waiting for stepw,about the T01A rom upgrade
my device is japanese tg01
5 zhengwei 66 Today, 15:56
Last post by: gmx333
No New Posts Verizon i920 - Need the .csc file
0 fire3element 12 Today, 17:20
Last post by: fire3element

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


RSS hit counter Lo-Fi Version Time is now: 9th February 2010 - 17:37

Please visit our 'Plus Partners' - these companies support MoDaCo through 'MoDaCo Plus' - Click Here for more details!

ActiveKitten | Binaryfish | Conduits | DeveloperOne | eSoft Interactive | FTouchSL | Inesoft | LastPass

Lingvosoft | monocube | OmegaOne | Omnisoft | Opera Software | Resco | SBSH | Splashdata

Sprite Software | Syncdata | Teksoft | Titanium Backup | VITO | WalkingHotSpot | WebIS | z4soft

Would your company like to become a 'Plus Partner'? Click Here to contact us!