I am creating an android application in that speech impaired user to call out left, right , forward, backward by waving the device in respective directions using android phone.I am using accelerometer reading for finding the phone motion.But the code is not working as expected.Here is my code.
@Override
public void onSensorChanged(SensorEvent event) {
Sensor sensor = event.sensor;
I have been working on logging data from accelerometer. Nonetheless, I find it difficult to control the on/off of the accelerometer sensor. I have tried to have two buttons, one called Start and the other Stop. I initialized my senor object in the onCreate() callback of the Activity Class.
Please help me i am stuck in between my dream project. Here I am sensing the data in onSensorChanged method & trying to send the data to PC over bluetooth.
I am trying to write a step counter for android. It currently includes four buttons in one activity:
a button to start recording accelerometer data which is stored in an arraylist. The arraylist takes a type Trace, which is a class I created to hold the data of one sensor change.
Does anyone know at what rate the accelerometer makes sensor data available for use?
For instance, is it real-time? Can I capture data from the sensor every .0001secs? Or is there a set rate?
Any information about this would be greatly appreciated.
Thanks
Hello there,
i am now currently using InsertCoin One X 9.7.0 and the stock kernel. My Hboot version is 1.12. But my g-sensor doesn't work properly. Sometimes the g-sensor works after I flashed another kernel or simply rebooting the device. I have searched on the internet about this problem but there are no solutions for that.
I have attached the log for the sensor.
You would think that there would be a straight forward solution.
I'm working on a game that uses accelerometer data to change a character's X position. So far, I have the right idea (I think), but I am bogged down with an error that I don't know how to work with.
I have the following class to read data from accelerometer:
public class Accelerometer implements SensorEventListener {
private SensorManager mSensorManager;
private Sensor mAccelerometer;
float deltaX;
float deltaY;
float deltaZ;
Activity activity;
public Accelerometer(Activity act)
{
this.activity = act;
mSensorManager = (SensorManager) t