Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > News and Article Discussion > iOS Blog Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 27, 2007, 11:11 PM   #1
MacRumors
macrumors bot
 
Join Date: Apr 2001
iPhone Accelerometer Demos?



Gizmodo reports on one blog who claims to have been able to access the iPhone accelerometers to produce some interesting effects.

Video

No one can yet attest to the accuracy of these demos, as they do seem a bit more sensitive than the accelerometers appear to be on the iPhone.

Article Link
MacRumors is offline   0 Reply With Quote
Old Aug 27, 2007, 11:16 PM   #2
nismo
macrumors member
 
Join Date: Aug 2007
pretty cool I hope its real
nismo is offline   0 Reply With Quote
Old Aug 27, 2007, 11:24 PM   #3
Telp
macrumors 68030
 
Telp's Avatar
 
Join Date: Feb 2007
Send a message via AIM to Telp
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?
__________________
Innovation distinguishes between a leader and a follower. -Steve Jobs
Telp is offline   0 Reply With Quote
Old Aug 27, 2007, 11:30 PM   #4
mustang_dvs
macrumors 6502a
 
mustang_dvs's Avatar
 
Join Date: Feb 2003
Location: 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.)
__________________
2.93GHz MacPro 5,1 | 2.6GHz MBP 9,1 | 1.2GHz Cube | 2x 2GHz Mini 2,1 | 160GB iPod | 16GB iPhone 3,3
DVSmith.net | thePhotosmith.com
mustang_dvs is offline   0 Reply With Quote
Old Aug 27, 2007, 11:54 PM   #5
mrkitty
macrumors newbie
 
Join Date: Aug 2007
Thumbs down 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.
mrkitty is offline   0 Reply With Quote
Old Aug 27, 2007, 11:54 PM   #6
deasine
macrumors member
 
Join Date: Mar 2007
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...
deasine is offline   0 Reply With Quote
Old Aug 28, 2007, 12:04 AM   #7
chr1s60
macrumors 65816
 
Join Date: Jul 2007
Location: California
Looks fake to me. I don't think the accelerometer is as sensitive as the videos are showing.
__________________
15" MacBook Pro - iPad - White iPad mini - iPod Classic - iPod Shuffle - iPod Nano - White/Silver iPhone 5
chr1s60 is offline   0 Reply With Quote
Old Aug 28, 2007, 12:13 AM   #8
Telp
macrumors 68030
 
Telp's Avatar
 
Join Date: Feb 2007
Send a message via AIM to Telp
I havent seen the video yet (stupid safari beta)
__________________
Innovation distinguishes between a leader and a follower. -Steve Jobs
Telp is offline   0 Reply With Quote
Old Aug 28, 2007, 12:21 AM   #9
shrimpdesign
macrumors 6502a
 
shrimpdesign's Avatar
 
Join Date: Dec 2005
Here's his blog post about it:
http://blog.medallia.com/2007/08/fun...ccelerome.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.
__________________
15" Unibody MacBook Pro (mid-2009) 2.53Ghz / 4GB / 256GB SSD
iPhone 3GS Black 32GB

Last edited by shrimpdesign; Aug 28, 2007 at 12:32 AM.
shrimpdesign is offline   0 Reply With Quote
Old Aug 28, 2007, 12:23 AM   #10
Chaszmyr
macrumors 601
 
Chaszmyr's Avatar
 
Join Date: Aug 2002
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.
Chaszmyr is offline   0 Reply With Quote
Old Aug 28, 2007, 12:29 AM   #11
shrimpdesign
macrumors 6502a
 
shrimpdesign's Avatar
 
Join Date: Dec 2005
Quote:
Originally Posted by Chaszmyr View Post
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.
__________________
15" Unibody MacBook Pro (mid-2009) 2.53Ghz / 4GB / 256GB SSD
iPhone 3GS Black 32GB
shrimpdesign is offline   0 Reply With Quote
Old Aug 28, 2007, 12:36 AM   #12
gceo
macrumors 6502a
 
gceo's Avatar
 
Join Date: Jul 2007
Location: 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.
__________________
...since system 6
gceo is offline   0 Reply With Quote
Old Aug 28, 2007, 12:40 AM   #13
grudgnor
macrumors newbie
 
Join Date: Jul 2007
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??
grudgnor is offline   0 Reply With Quote
Old Aug 28, 2007, 12:40 AM   #14
mduser63
macrumors 68040
 
mduser63's Avatar
 
Join Date: Nov 2004
Location: Salt Lake City, UT
Send a message via AIM to mduser63
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.
mduser63 is offline   0 Reply With Quote
Old Aug 28, 2007, 02:26 AM   #15
Snowy_River
macrumors 68020
 
Snowy_River's Avatar
 
Join Date: Jul 2002
Location: Corvallis, OR
Send a message via AIM to Snowy_River Send a message via Yahoo to Snowy_River
Quote:
Originally Posted by Telp View Post
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! )

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.
Snowy_River is offline   0 Reply With Quote
Old Aug 28, 2007, 06:31 AM   #16
whenpaulsparks
macrumors regular
 
Join Date: Jun 2004
Location: 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.
whenpaulsparks is offline   0 Reply With Quote
Old Aug 28, 2007, 06:48 AM   #17
MacHarne
macrumors 6502
 
Join Date: Mar 2005
Location: Virginia, U.S.A.
Send a message via AIM to MacHarne
Thumbs up

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.
__________________
iMac C2D 20, 2.16, 2GB, 250GB, 256V
MacBook CD, 2.0, 2GB, 80GB
12" PowerBook G4 1.5, 1.25GB, Super, 80GB
3G, 1G iPod; 1G shuffle
MacHarne is offline   0 Reply With Quote
Old Aug 28, 2007, 08:47 AM   #18
sartinsauce
macrumors regular
 
Join Date: Feb 2006
Location: 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.
sartinsauce is offline   0 Reply With Quote
Old Aug 28, 2007, 10:08 AM   #19
swordfish5736
macrumors 65816
 
Join Date: Jun 2007
Location: Belle View
Send a message via AIM to swordfish5736
Quote:
Originally Posted by Telp View Post
I havent seen the video yet (stupid safari beta)
works fine for me. I'm running 3.0.3 on a G4 powerbook
__________________
swordfish5736 is offline   0 Reply With Quote
Old Aug 28, 2007, 10:10 AM   #20
Telp
macrumors 68030
 
Telp's Avatar
 
Join Date: Feb 2007
Send a message via AIM to Telp
Really? Half the time my flash doesnt work, and i have to restart safari countless times till it works.
__________________
Innovation distinguishes between a leader and a follower. -Steve Jobs
Telp is offline   0 Reply With Quote
Old Aug 28, 2007, 12:06 PM   #21
CJD2112
Guest
 
Join Date: Dec 2006
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?
CJD2112 is offline   0 Reply With Quote
Old Aug 28, 2007, 12:21 PM   #22
grudgnor
macrumors newbie
 
Join Date: Jul 2007
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.
Attached Files
File Type: zip Balls.zip (40.4 KB, 371 views)
grudgnor is offline   0 Reply With Quote
Old Aug 28, 2007, 12:42 PM   #23
CJD2112
Guest
 
Join Date: Dec 2006
Quote:
Originally Posted by grudgnor View Post
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...
CJD2112 is offline   0 Reply With Quote
Old Aug 28, 2007, 01:21 PM   #24
pyrex
macrumors member
 
Join Date: Jan 2003
Send a message via AIM to pyrex
you should put that app on installer.app somehow for an easier install
pyrex is offline   0 Reply With Quote
Old Aug 28, 2007, 02:15 PM   #25
grudgnor
macrumors newbie
 
Join Date: Jul 2007
Quote:
Originally Posted by CJD2112 View Post
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
grudgnor is offline   0 Reply With Quote

Reply
MacRumors Forums > News and Article Discussion > iOS Blog Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Gyroscope And Compass not working + Accelerometer! drinu89 iPhone Tips, Help and Troubleshooting 1 Apr 18, 2011 05:59 AM
After One Day the iPhone 4 Demo Models Are More Scratched Up Than the iPhone 3GS Demo MICHAELSD iPhone 17 Jul 1, 2010 12:47 PM
Iphone accelerometer turn off orionpower iPhone Tips, Help and Troubleshooting 2 Oct 14, 2007 10:16 PM
iPhone accelerometer? Mike Teezie iPhone 10 Jul 16, 2007 04:22 PM
Tilt: iPhone Accelerometer Game MacRumors Jailbreaks and iOS Hacks 7 Jul 12, 2007 01:37 PM


All times are GMT -5. The time now is 02:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC