Quote:
|
Originally Posted by David55
HI Kevin
I would like to know, what are the advantages of using the full-length accelarometer code found in your website? I was able to get the accelarometer working and printing values by simply doing
x=Get_Analog_Value(rc_ana_in01);
printf("%dn",(int)x);
and then got to an equasion and finished up the story.
|
If all you need to do is take a voltage measurement from a potentiometer or an accelerometer (to calculate an angle relative to the gravity vector), then my code is overkill. My code was originally designed to wring out the best possible performance out of a gyroscope and then later modified to sample additional ADC channels while also sampling a gyro. My code also uses oversampling and decimation to gain measurement resolution and lower the noise floor.
-Kevin