01-23-2012 05:46 PM - edited 01-24-2012 01:55 PM
Tried to use buffer to collect acceleration, but fail.
Could anyone help me to debug??
if(paused==2){
for (i =0; i < 2; i++){
sensor_event_get_xyz(event, &force_x[i], &force_y[i], &force_z[i]);
if(force_x[0] != force_x[1]){
//if(tmb[0].millitm-tmb[1].millitm > 19){fail without data
ftime(&tmb[i]);
fprintf(f,"%ld%d, %7.3f, %7.3f, %7.3f\n", tmb[i].time, tmb[i].millitm, force_x[i], force_y[i], force_z[i]);
}
}
Thank you,
Solved! Go to Solution.
01-25-2012 02:24 PM
You are trying to read accelerometer data without checking if the data is ready (event occurred). Have a look at the following link for an example.
01-25-2012 11:10 PM
Hi lyon819,
You have started multiple threads asking the same or similar questions (I just counted maybe 8 or 9 threads which only covered 2 or 3 questions). Can you please try to direct your related questions to a thread you have already started? Someone reading a question in one of your threads may not notice that it has already been answered in another thread.
Cheers,
Sean