Wednesday, January 7, 2009

Accelerometer in the Simulator?

I haven't tried this out yet myself, but it's a very cool idea. This blog post explains how to make the iPhone simulator use your laptop's accelerometer, which fills one of the few holes in the simulator's functionality.



10 comments:

brianhammond.com said...

This is a little silly; why not have an app running on the iPhone that talks to your app running in the simulator, sending it the accelerometer values? Last I checked cocos2d-iphone had something like this.

brianhammond.com said...

I should've read the article; it mentions what I mentioned earlier. Nevermind.

moritz said...

I can confirm that this works - never got around to blog about it. Back in October I used pretty much the same approach, the only difference was that I did it directly in C using the unimotion code base. The noteable thing was that I had to map the (x,y,z) coordinates using (-x,-z,y). I tested this with the gravity/teapot demo.

By the way, I enjoy your posts on OpenGL, being at a similar situation. I had done some OpenGL years ago and recently got back into it via the IPhone and ported a Rubik's Cube sample demo.

Jeff LaMarche said...

Thanks, Moritz. This week at Macworld has been a whirlwind - it's great that I'm getting to meet tons of people, but I'm not getting much work done, so there haven't been many substantive postings this week, but I'm hoping to get the particle system article done before too long.

papillon68 said...

I'm also relearning OpenGL myself, and I like very much coding on Iphone. Your blog Jeff is very helpful, I come around a couple of times every days to find news and read previous articles.
How is it at MacWorld ? Will you be able to finish the Wavefront Loader when you are back ? That is a very interesting project, IMO ...
cheers

stephthirion said...

Great stuff... I'm looking for the equivalent for multitouch, sending touches from the device to the simulator (I need more than the pinch and drag that are available on the simulator). Are you aware of any existing solution?

Sergey A. Stolbov said...

This is not the only way to debug accelerometer-based apps in simulator. We have an entry for this in our IAQ (Infrequently Answered Questions) for iPhone developers.

luci said...

The lack of accelerometer from the iphone simulator is not a problem anymore. I made a small app and an UIAccelerometer replacement class, what will help you during the development. You don't need any iphone to be connected to your computer.
Iphone Accelerometer Simulator

Edwin said...

scrub m65 kamagra attorney lawyer body scrub field jacket lovegra marijuana attorney injury lawyer

h4ns said...

What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.

Arsenal vs Huddersfield Town live streaming
Arsenal vs Huddersfield Town live streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Notts County vs Manchester City Live Streaming
Notts County vs Manchester City Live Streaming
Bologna vs AS Roma Live Streaming
Bologna vs AS Roma Live Streaming
Juventus vs Udinese Live Streaming
Juventus vs Udinese Live Streaming
Napoli vs Sampdoria Live Streaming
Napoli vs Sampdoria Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
AS Monaco vs Marseille Live Streaming
AS Monaco vs Marseille Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Technology News | News Today | Live Streaming TV Channels