Hi im pretty new to progaming as a whole, currently studying Electronics over at anglia ruskin. We have a project using LIS302 and Nokia LCD and I am trying to use little bit of trig to get accurate tilt for X and Y which will be passed to display function ......
 I have the trig function running and seems to be good. Basiclly using all 3 axis to overcome lack of resolution past 60 degrees pos and neg.
 My question is how do i run calibrate function? I need to setup a function to calibrate x y z axis and place this offset into accessable int/float location to allow me to read full tilt ( currently X runs -80 ish to +80 ish and Y 70 +-, think this is mainly due to lack of calibration of Z axis) current funcction generates angle in radians and then converts to degrees. I am also going o do moving average using info i have found on here and other sources.
 something like
 Float array of 5 data points
 start loop of 5
 read output acc.x
 put into array at loop (i)
 average over 5 (i know that for first 5 runs this will give incorect readings)
 reset loop which will cause over write of array location 0
 continue.
 Does this sound ok ish
 Anyway I will post my code after submiting the assignment  .I hope to be a long term member of the Mbed comunity contributing as well as just playing :)
  
 Danny
                 
             
        
Hi im pretty new to progaming as a whole, currently studying Electronics over at anglia ruskin. We have a project using LIS302 and Nokia LCD and I am trying to use little bit of trig to get accurate tilt for X and Y which will be passed to display function ......
I have the trig function running and seems to be good. Basiclly using all 3 axis to overcome lack of resolution past 60 degrees pos and neg.
My question is how do i run calibrate function? I need to setup a function to calibrate x y z axis and place this offset into accessable int/float location to allow me to read full tilt ( currently X runs -80 ish to +80 ish and Y 70 +-, think this is mainly due to lack of calibration of Z axis) current funcction generates angle in radians and then converts to degrees. I am also going o do moving average using info i have found on here and other sources.
something like
Float array of 5 data points
start loop of 5
read output acc.x
put into array at loop (i)
average over 5 (i know that for first 5 runs this will give incorect readings)
reset loop which will cause over write of array location 0
continue.
Does this sound ok ish
Anyway I will post my code after submiting the assignment .I hope to be a long term member of the Mbed comunity contributing as well as just playing :)
Danny