problem about HT accelerometer

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
cainmalvado
Posts: 2
Joined: 15 Mar 2011, 13:45

problem about HT accelerometer

Post 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.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: problem about HT accelerometer

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
cainmalvado
Posts: 2
Joined: 15 Mar 2011, 13:45

Re: problem about HT accelerometer

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests