Question about Using the Gyro sensor in LeJos

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Question about Using the Gyro sensor in LeJos

Postby Will1023 » Wed Nov 07, 2007 6:14 pm

Hello. I was wondering if someone could explain to me how to use the HiTechnic Gyro sensor in LeJos. I have looked at the API, and I do not see any specific classes for gyro sensors, although I do see a TiltSensor class (which does not seem to be the same thing, but it is the closest I can find). Do you use the raw value from the generic SensorPort class, some feature of the TiltSensor class or is there some other class that I am missing specifically designed to be used with the gyroscope? Thanks.
Will1023
New User
 
Posts: 1
Joined: Wed Nov 07, 2007 5:58 pm

Postby cubed » Sat Nov 10, 2007 8:03 am

This is also something I am interested in, can leJOS make use of the gyroscopic sensor?
cubed
New User
 
Posts: 2
Joined: Sat Nov 10, 2007 12:04 am

Postby lawrie » Mon Nov 12, 2007 11:37 pm

We have not written a driver class for the Gyro sensor yet.

Looking at the HiTechnic spec, using the getRawValue() method inn SensorPort and subtracting an offset (such as 598 in the HiTechnic RobotC example), should work.
lawrie
leJOS Team Member
 
Posts: 929
Joined: Mon Feb 05, 2007 1:27 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff