This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using a "eZ430-Chronos" to alarm at 2G of force

 

Hello.

I have just been asked to help an individual, who purchased two "eZ-430-Chronos Development Tools" to measure 2G of force and wants it to alarm when it reaches the setpoint.  Can this "Watch" achieve this?  I have it working and communicating to display XYZ on a graph with my PC.  He would like it to just wear the watch and have the audible alarm when 2G of force is reached.

Also, I should mention I have no experience writing code, neither does the individual who bought these, yet it is now my problem to get it working.  The joys of being at the bottom of the ladder.

I have found the following code in the search, but I am not sure how to modify it to do what I want.

http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/157849.aspx

What I need to calculate is the following:

The magnitude of a vector

Let a = xi + yj + zk

then the magnitude of a, written a (or sometimes |a|), is given by:

a2 = x2 + y2 + z2

Proof:By Pythagoras' theorem

w2 = x2 + y2 and

a2 = w2 + z2

=> a2 = x2 + y2 + z2

I don't need to know the direction.  When A (Squared) is greater than 2 I need an alert.

Any help would be greatly appreciated.

Thank you in advance.

**Attention** This is a public forum