HOW to use and write a code for H48C Accelerometer

I hooked up my H48C accelerometer to my arduino board. Ive been having trouble finding a code to just use the accelerometer to measure the tilt in x,y, and z direction and show it neatly on the serial monitor.

if you can help that would be great. thank you.

Ultimately I want to measure the distance and the direction the accelerometer traveled like the accelerometer in foot pods.

thank you

http://www.arduino.cc/playground/Main/ParallaxH48C

so I tried to use the code provided on the website with my arduino board and my H48C accelerometer and when I pulled up my serial monitor I keep getting symbols.

what am I doing wrong?

Does the baud rate shown on the Serial Monitor match the baud rate in the sketch?

1 Like

Im sorry Im new to this.... what sketch?

"so I tried to use the code provided on the website" <-- that sketch

i dont think so no.. i get ooooo and uuuuuu's

You uploaded a sketch to the Arduino. In the setup function, there is a line like this:

Serial.begin(9600);

What number is in the parentheses in your sketch?

At the bottom of the Serial Monitor window, there is a drop down list to allow selecting a baud rate. What value is selected in that window?

If the numbers are not the same, make them the same. If they are the same, post the code you are running.