I have a class called MainGame, which is defined like this in my .h:
@interface MainGame : Renderer <UIAccelerometerDelegate>
Then later in my .m I have this:
- (void) accelerometer: (UIAccelerometer *)accelerometer didAccelerate: (UIAcceleration *)acceleration {
// here I would read values like accelerometer.x
NSLog(@"accele...
in my app the accelerometer lags. a lot. i think it might be to do with the fact that all of my code is running through my main . h file which is also the accelerometer delegate like this:
@interface MainView : UIView <UIAccelerometerDelegate> {
IBOutlet UISlider *sensitivity;
float valueX;
CGPoint pos;
NSTimer *maintimer;
NSTimer ...
Hi !
I am trying to make an application that would detect what kind of shape you made with your iPhone using accelerometer.
As an example, if you draw a circle with your hand holding the iPhone, the app would be able to redraw it on the screen.
This could also work with squares, or even more complicated shapes.
The only example of appli...
Hi does anyone have great examples or any suggestions on Visual Studio 2008 smart device windows mobile 6.0 project coding examples? I'm new to it and wish to develop an app on accelerometer and on Samsung Omnia mobilephone.
Will really be grateful if there's any help from pros around here :). Oh and i have samsung windows mobile SDK in...
are there example codings i could look into?
thanks
...
I'm trying to map my movements with a android device into an OpenGL scene.
I've recorded accelerometer values for a simples movement: Moving the phone (lies flat on a table) 10cm forward (+x), and then 10cm backward (-x).
The problem is that this values when used to calculate velocity and position, makes only the opengl cube go forward...
Have looked so long for a library specialized in dealing with iPhone Accelerometer but couldn't find anything.
I have made some few sample apps, but none reaches a level of accuracy as in Labyrinth games for example, so any idea about a library for that? Or maybe an open source app?
Would be better if it's integrated in a Physics libra...
does anyone knws how do i call it?
public struct SmiAccelerometerVector
{
public float x;
public float y;
public float z;
}
i want to get the x,y,z values and paste it into a label.
...
Hello,
I am working on an iPhone app where we are trying to calculate the acceleration of a moving car. Similar apps have accomplished this (Dynolicious), but the difference is that this app is designed to be used during general city driving, not on a drag strip.
This leads us to one big concern that Dynolicious was luckily able to avo...
The code below is from the book Beginning iPhone 3 Development, chapter 15, using the accelerometer to control a ball.
I want to use a label instead of the ball, and only move in the x direction.
However, I donno how to revise the code to achieve this goal.
Can anyone please help me?
THX so much!!!!
- (id)initWithCoder:(NSCoder *)coder ...
I have two view controllers.MainViewcontroller has the - (void)accelerometer: method in it and just another SecondViewController. I would like to pass the accelerometer data from the main to the second but I don't know the correct way to pas it.
(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)accele...
From what I can tell, my app should be firing accelerometer events while Im using the iPad simulator in XCode, but its not.
I have googled around and it somewhat seems that the accelerometer is not implemented in the simulator, is this correct? If so, why on earth would they have a "Hardware->Shake Gesture" menu option?
My code is as f...
Hello,
I would like to know if there are some libraries/algorithms/techniques (python, if at all possible) that help to extract features from accelerometer data (extracted from and android phone, btw), like periodicity of movements, energy of acceleration and the like. Has anyone done this kind of task before?
Thank you very much in adv...
I have a simple iPhone game consisting of two "threads": the main game loop where all updating and rendering happen 30 times per second (NSTimer)... and the "thread" that calls the accelerometer delegate 100 times per second. I have a variable "xPosition" that's updated in the accelerometer delegate function and used in the game loop. ...
I want to be able to display an image on the iPhone when the device is shaken. I can play a sound but also want to pop up an image at the same time.
Any ideas on how to do this would be appreciated.
thx,
wes
...
Hi all,
I'm writing for the iPhone and I'm trying to measure the time between maximum accelerations. Imagine you've attached your iPhone to an oscillating spring. What I want to do is measure the frequency of the oscillation. The way I am going about doing this is storing a certain number acceleration values (updated 20 times per sec...
I am starting with an Activity based off of this ShakeActivity and I want to write some unit tests for it. I have written some small unit tests for Android activities before but I'm not sure where to start here. I want to feed the accelerometer some different values and test how the activity responds to it. For now I'm keeping it simp...
Hi,
I want some help on UIAccelerometer class. I want to find some way to find out or distinguish when I wave iphone device from right-to-left and the left-to-right. I am getting x,y,z values as well as interval value. I am also getting velocity and distance calculated from normal physics rule.
Distance = (prevDist + sqrt(pow((prevx - ...
Hi !
I'm trying to use the accelerometer to move a UIImage. I works well but my problem is that with my code
self.character.center = CGPointMake(160+acceleration.x*175, 230-acceleration.y*175);
my picture moves even on a stable surface because of the precision of the acceleration.x value. So I decided to use a workaround by multiply...
Most IBM (and some Dell) laptops have built-in accelerometers to stop any moving parts during a sudden fall, but I was unable to find a standardised Windows API to access this data. I assume that each manufacturer would provide a driver to interface with the sensor.
Which popular laptop brands come standard with accelerometers accessib...