Is there a working Robot C example of calibrating a VEX Analog XYZ Acelerometer?

I have the analog accelerometer working to measure tilts in degrees. Are there any good calibration examples written in Robot C?

I need to calibrate the tilts from integers to degrees…

Dear @GalaxyGhost, even though I have serious doubts about your ability to pass the full Turing Test after a number of your recent posts, this is a good question.

This is an reference document on using accelerometer sensor in RobotC:
http://cdn.robotc.net/pdfs/natural-language/hp_accelerometer.pdf

Once you configure your accelerometer you need to collect test data using the protractor and create a table of the measured tilt degrees vs the accelerometer readings.

It might be a good idea to to repeat the experiment several times at 5 or 10 degree increments, because the measurements could contain both operator errors and noise present in the hardware.

Then you could plot those results and easily see if there is significant errors between the readings, if test results are not perfectly aligned. The slope of the line that averages the points on the graph is your conversion factor between sensor output and the tilt of the sensor.

Most of the spreadsheet software have this built-in functionality called linear regression:

linear-regression
But, honestly, for what we do here the precise calibration step is hardly necessary.

4 Likes

Great answer! I will work with this information you provided! Thanks!