Page 1 of 1

problem about HT accelerometer

Posted: 18 Mar 2011, 12:32
by cainmalvado
Hi,
I try to control the HT accelerometer,but still have some problem.
My problem is that how to call the function in Mindstorm original firmware to read the HT accelerometer value and control the motor?

Thanks, and have a nice day,
Brynhild.

Re: problem about HT accelerometer

Posted: 18 Mar 2011, 21:43
by afanofosc
I can't tell from your question what programming language you are using. Is it NXC? If so, then you ought to be able to use SetSensorLowspeed(S1) and then later use

Code: Select all

bVal = ReadSensorHTAccel(S1, x, y, z);
where x, y, and z are int variables used to store the 3 axis acceleration values read from the HiTechnic accelerometer sensor.

John Hansen

Re: problem about HT accelerometer

Posted: 20 Mar 2011, 14:23
by cainmalvado
My project should be use the firmware which is mindstorm opensource one.
Can it be possible to directly use the function in it to read sensor?