Question: Write a C program to interface the 3-dimensional accelerometer ADXL335. Your program should sample the x-, y- and z-axis 5-times per second. Calculate the

Write a C program to interface the 3-dimensional accelerometer ADXL335. Your program

Write a C program to interface the 3-dimensional accelerometer ADXL335. Your program should sample the x-, y- and z-axis 5-times per second. Calculate the accelerations in terms of 'g' (Gravity of Earth) and send the sample to workstation. The samples (gx, gy and gz) should be sent such that it is displayed in UAH serial app. Please revisit the previous Lab 8 assignment to see how to use UAH serial app. You also need to calculate the magnitude of acceleration, mag. If the value of mag is greater than or equal to 2g of earth, play siren on the buzzer. Hint: mag (gx+gy+gz)1/2 = [MSP430x646x.h]

Step by Step Solution

3.40 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Interotuction C was formerly developed in the 1970s by Dennis Ritchie at Bell Telephone Laboratories ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!