NXC + HTgyro

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
mh001
Posts: 3
Joined: 09 Dec 2014, 14:18

NXC + HTgyro

Post by mh001 »

Hi,
I have an NXT-brick with brixcc-firmware.
Recently I purhcased a HT-gyro sensor.

I have two questions :
1. How do I extract the "degrees-of-rotaion" when I rotate the gyro-sensor. Can someone give a simple NXC-code example?

2. Supposedly it is needed to obtain the "off-set". This should be done value by keeping the sensor absoulutely still, do some readings with an off-set value of zero. Then calculate the mean-value as an integer. This value should be used as the off-set value in the appropriate functions. Obtaining the off-set value is no problem, however, the value that is read still fluctuates slightly.

So I need a code-example (or sevaral) to obtain degree-of-degree quite acucrately and a gyro value of zero when the sensor is absolutely still.

Kind regards,
Merijn
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest