Go Down

Topic: HOW to use and write a code for H48C Accelerometer (Read 1 time) previous topic - next topic


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




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?



"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:
Code: [Select]

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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131