Accelerometer

How do you connect the accelerometer and how do you read the data?

Kevin Watson has graciously donated his time and wrote us an accelerometer driver with supporting documentation. You can get it here.

Basically to read the value of any analog input device:

Get_Analog_Value(rc_ana_in0X)

Could anyone tell us how to change the Analog Input for the Accelerometer? I have been reading ans can not seem to find it. This is one of those things we are probably just looking over and can’t find. If anyone can help us that would be great.

THIS QUESTION WAS POSTED SO THE PROGRAMMERS CAN STOP DRIVING ME CRAZY…(IM AN ELECTRONICS PERSON)

Hook up your accelerometer, using the FIRST provided pinout guide. Then put a printf in your code that prints that analog value. Now, move the accelerometer to see how the values vary.

The ADC channel selection is the first thing that’s done in Initialize_ADC( ).

-Kevin