Re: Memsic 2125 code?

Originally Posted by
Ramius
Okay so I corrected the code in the Read_X_Force as the "return" caused the program to stop and the formula said to divide by 8 not multiply.
Ed, are you refering to the place in the formula where there was a /12.5% ? If so, this is simplified by *8.
See this part of the previously attached document:
"Since our T1 time is in microseconds and there are 1000 microseconds in a millisecond, we need
to multiply the T2 value and 0.5 by 1000 to adjust the equation. This makes the math easy for the
Stamp and gives us an output with a resolution of 0.001g. Finally, the divide by 12.5% part of the
equation is converted to multiplying by eight ( 1 / 0.125 = 8 ) – we couldn't ask for a value much
more convenient than that."
http://www.scalerobotics.com
Bookmarks