Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

iPhone Accelerometer Demos?

MacRumors

macrumors bot
Original poster
Apr 12, 2001
50,386
11,761

Telp

macrumors 68040
Feb 6, 2007
3,069
18
Although it doesnt look real, it wouldnt surprise me that someone has done this. People have done this with the sudden motion sensor in the macs, so why not?
 
Comment

mustang_dvs

macrumors 6502a
Feb 9, 2003
691
12
Durham, NC
Methinks that these are simply videos that are playing on the iPhone and the "user" is moving to cues that make it look like he's causing the actions on-screen. (There's a "magician" who does exactly that, first with Palm Pilots, now with an iPhone.)
 
Comment

mrkitty

macrumors newbie
Aug 27, 2007
9
0
i say fake.

one thing to actually hack that deep this early, quite another to have written three separate applications that take advantage of it already. somehow, i'd think we'd had heard after the first "proof of concept" app worked.
 
Comment

deasine

macrumors member
Mar 19, 2007
75
0
I don't think those are real...

But I know the next generation (Java 8) Sony Ericsson Phones with the accelerometers can do the marble game for sure. Pretty amazing what technology can do now...
 
Comment

shrimpdesign

macrumors 6502a
Dec 9, 2005
609
0
Here's his blog post about it:
http://blog.medallia.com/2007/08/fun_with_the_iphone_accelerome.html

It's from the same guy who made the SmackBook hack (hit the side of your MacBook, and virtuedesktops switches desktops) so I think it's legit. He says that he tapped the raw accelerometer data.

The accelerometer in the iPhone doesn't seem sensitive, but that's because Apple uses it for the display rotation, it probably detects massive changes in orientation, not little ones, so it won't change on accident.
 
Comment

Chaszmyr

macrumors 601
Aug 9, 2002
4,267
85
The iPhone accelerometer seems nowhere near that sensitive, I call fake. It is of course possible that Apple intentionally made the accelerometer less sensitive in their software so you don't accidently turn stuff when you make subtle movements.
 
Comment

shrimpdesign

macrumors 6502a
Dec 9, 2005
609
0
It is of course possible that Apple intentionally made the accelerometer less sensitive in their software so you don't accidently turn stuff when you make subtle movements.

I think it's much more likely that Apple has a regular accelerometer, and only switches landscape/portrait when it detects a big change in orientation.
 
Comment

gceo

macrumors 6502a
Jul 13, 2007
655
1
San Diego, CA
I'm kinda surprised at the number of people that think it's fake. Y'all are crazy. The dude's legit. Read the pdf on the sensor. Output sample rate up to 400 Hz... "not that sensitive" Huh? It's in the hardware.

This is sweet. Fast forward a year... games, apps, bumping input, etc... It'll be tight.
 
Comment

grudgnor

macrumors newbie
Jul 1, 2007
5
0
Yes, the iPhone accelerometer data is that sensitive, and it's even easier to get access through UIApplication.h

Code:
- (void)acceleratedInX:(float)fp8 Y:(float)fp12 Z:(float)fp16;

Just override that method and you'll get instant float values that you can use, and it is very sensitive. I had a simple ball demo with velocity, acceleration and collision detection working over a week ago.

Although, I'm not sure why the authors say that they had to do "a rather lengthy bout of reverse engineering" and talk about ARM assembly, the iPhone dev community has known about the easily accessed Cocoa API for a long time.

Also, why does everyone always assume this stuff is fake??
 
Comment

mduser63

macrumors 68040
Nov 9, 2004
3,039
30
Salt Lake City, UT
There really aren't that many accelerometer chips available for Apple to use, and all the ones I've worked with (several) are very sensitive. Obviously right now, Apple only cares about ~90 degree changes in orientation, but there's no reason for them to throw away the raw data coming off the accelerometers, and it doesn't seem at all implausible that it's available to developers.
 
Comment

Snowy_River

macrumors 68030
Jul 17, 2002
2,519
0
Corvallis, OR
I havent seen the video yet (stupid safari beta)

Runs fine on mine. (v3.0.3, 1.67GHz G4)

I thought about the idea of it being a queued video. (I did something like that with queued speech to make it seem like I was talking to my computer. Great practical joke on a friend of mine about 10 years ago! :D )

However, if it is that, then the queues are exceptionally well done. At this point I'm more inclined to think that it's actually real.
 
Comment

whenpaulsparks

macrumors regular
Jun 5, 2004
210
1
Tallahassee, FL
the accelerometer, if it is anything like the MacBooks, and it probably is, then yes it is that sensitive. apple probably made it seem less sensitive to prevent accidental screen rotations. do yourself a favor and get one of those apps where you can see the accelerometer data from your MacBook. sometimes just walking into the room can cause minor readings on the sensors.
 
Comment

MacHarne

macrumors 6502
Mar 3, 2005
321
0
Virginia, U.S.A.
Accelerometer data can be used in a variety of ways. The rotation modes of the iPhone, for example, require that a certain voltage is reached and sustained for a period of time by the changing resistance inside of the accelerometer. A fast or slow rotation should both produce the same result - the voltages summing over time, in effect. Then, the iPhone does the rotation transition, similar to a Keynote transition, and all of sudden it's like you changed screen orientations.

I say this YouTube demo is real. All you have to do is stream the accelerometer data live and relate the data to a graphical display transition, in this case rolling marbles or that one game thing. It's a relatively simple amount of code to write, even in, say, LabView or MATLAB. I think the harder hack is getting it to actually run inside of the iPhone.
 
Comment

sartinsauce

macrumors regular
Feb 1, 2006
191
0
Los Angeles
Looks pretty real to me. Why wouldn't it be? I know the iPhone doesn't seem to respond quickly, but as someone else suggested, I suspect Apple has got the software weeding out the data it needs for 90 degree rotations.

Besides, real or fake, it's a cool freakin' clip.
 
Comment

Telp

macrumors 68040
Feb 6, 2007
3,069
18
Really? Half the time my flash doesnt work, and i have to restart safari countless times till it works.
 
Comment

3282872

macrumors 6502a
Dec 11, 2006
821
0
Fake. There is no way that it is that sensitive. Besides, if it were true why hasn't the source code been posted and why is the video clip so short? :cool:
 
Comment

grudgnor

macrumors newbie
Jul 1, 2007
5
0
Here's proof that this isn't fake

Here's my code for a very very (very) basic accelerometer based application that I was working on a couple of weeks ago. It's my first Cocoa app ever, as well as my first jump into any kind of game programming. It's just a ball that accelerates when you tilt around your iPhone, and hopefully collides with the walls that are around it. Because of my inexperience with basic collision detection, sometimes the ball breaks through the barriers, but you can get the basic idea of what I was doing from this.

As you can tell from the source, getting to the iPhone's accelerometer data is really easy, just overriding a method that is provided by Apple's UIApplication framework, which every iPhone application has access to. Although it's not documented on the internet very well at all, the good folks at iphone-dev/iphone-uikit channel provided me with help with getting to the accelerometer data (thanks kroo).

I might post a video if people still don't believe that the accelerometer is really this sensitive for those who haven't started with 3rd party apps yet.

I'd like to mention that the developer in the Youtube video definitely has some awesome programs, and I only wish I had the cocoa expertise to write them.
 

Attachments

  • Balls.zip
    40.4 KB · Views: 411
Comment

3282872

macrumors 6502a
Dec 11, 2006
821
0
Here's my code for a very very (very) basic accelerometer based application that I was working on a couple of weeks ago. It's my first Cocoa app ever, as well as my first jump into any kind of game programming. It's just a ball that accelerates when you tilt around your iPhone, and hopefully collides with the walls that are around it. Because of my inexperience with basic collision detection, sometimes the ball breaks through the barriers, but you can get the basic idea of what I was doing from this.

As you can tell from the source, getting to the iPhone's accelerometer data is really easy, just overriding a method that is provided by Apple's UIApplication framework, which every iPhone application has access to. Although it's not documented on the internet very well at all, the good folks at iphone-dev/iphone-uikit channel provided me with help with getting to the accelerometer data (thanks kroo).

I might post a video if people still don't believe that the accelerometer is really this sensitive for those who haven't started with 3rd party apps yet.

I'd like to mention that the developer in the Youtube video definitely has some awesome programs, and I only wish I had the cocoa expertise to write them.

You might want to change the name of the app. Balls lol ;). Ok, ok, I have a dirty mind...
 
Comment

pyrex

macrumors member
Jan 11, 2003
57
0
you should put that app on installer.app somehow for an easier install
 
Comment

grudgnor

macrumors newbie
Jul 1, 2007
5
0
You might want to change the name of the app. Balls lol ;). Ok, ok, I have a dirty mind...

Haha, yeah I thought about that, but with the frustration that's involved with writing my first cocoa app for a device that doesn't have formal 3rd party application support, I needed something stupid that would make me laugh.

And seriously, this app is nothing great, I feel like it's not worth putting on Installer.app
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.