View unanswered posts | View active topics It is currently Fri Apr 18, 2014 5:15 am






Reply to topic  [ 3 posts ] 
Compass 
Author Message
Rookie

Joined: Wed Oct 07, 2009 9:39 am
Posts: 16
Post Compass
I am trying to use a compass sensor and am having some issues. It can work well sometimes but for the most part it doesn't. I think that they are far enough from motors but I am not quite positive. In any case I need to know how to calibrate it and still be able to use SensorValue(compass) to read it. I'm sure this has been answered and I just can't find it. Also if you could explain the code that would be great.
Thanks


Fri Dec 04, 2009 7:42 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3105
Location: Rotterdam, The Netherlands
Post Re: Compass
The built-in drivers do not support calibration. If that is what you need, then you must use the drivers from the 3rd Party Driver Suite (check my signature for the URL). In it you will find HTMC-test2.c which is a calibration program. You will need to tweak it a bit to make it work with your own robot.

Here's how it works:
Calibration is started and the robot is rotated about its axis, a little more than 360 degrees over a period no less than 20 seconds. Then calibration is stopped.

Please also notice that the sensor is also sensitive to large metal objects in the vicinity, think rebar in your floors and walls. This may or may not influence some of your readings.

Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Dec 05, 2009 3:10 am
Profile WWW
Rookie

Joined: Wed Oct 07, 2009 9:39 am
Posts: 16
Post Re: Compass
Thanks


Sat Dec 05, 2009 2:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.