Note your order number in the support request.
You can find order number on your Packing-slip or Order confirmation e-mail.
Humble Supporter of:
Robofest
Trinity College Fire Fighting Robot Contest.
Contact:
E-mail: Address:
mindsensors.com
8607 Mayland Drive
Richmond, VA 23294 USA. Phone: (804) 767-8116 Fax: (804) 859-4607
Compass Sensor for RCX
Features
Compass Sensor for RCX is high precision sensor that connects to an RCX input port. This sensor measures the earth's magnetic field and reports heading angle clockwise from magnetic north.
Easy to use.
Use it as a 'Light Sensor' on your RCX.
Can be used with ROBOLAB, RIS-1.0, RIS-2.0 or LejOS.
Can be used with AMUX (Active Sensor Multiplexer)
This sensor will work with NXT as light sensor attached using converter cables supplied with MINDSTORMS Education NXT set.
How to use Compass Sensor for RCX
On your RCX (or in your program) set this sensor as a 'Light Sensor'. The values reported by this sensor range from 0 to 100; where Zero (or 100) corresponds to magnetic north. Reading of 25 indicates heading of East, 50 indicates south and 75 indicates west. Each unit change in between corresponds to 3.6? change in heading.
This sensor is very sensitive to external magnetic fields, and needs to be calibrated for it's environment.
How to calibrate Compass Sensor
Install Compass Sensor in its final position in the robot structure with all the motors, RCX and batteries in place.
Power ON RCX and set the Compass sensor port as Light Sensor. Do not run any program.
Press the calibration switch twice - this will begin calibrations and the display will increment from 1 to 100 slowly
Slowly turn the robot two or three times around itself in clockwise direction (taking roughly 20 seconds per turn).
Press the calibration switch on Compass Sensor when done.
Note: While in calibration mode, the Compass Sensor's reading increments from 0 to 100 slowly but continuously. It's an indication that your sensor is in calibration mode.
If you accidently press the calibration switch
If you pressed it once, the RCX display will be alternating between 25 and 75. In that case, you may wait for it to timeout (3 seconds) and then resume normal operations. Or you may power off the RCX.
If you pressed it twice, the Compass sensor has entered the calibration mode, and you must complete calibration process. While in calibration mode, the RCX display will increment from 0 to 100 slowly but continuously. When it reaches 100, it will begin from 0 again.
Direction aware Rover powered by Compass sensor This Robot was made using rover base with two motors and tank trade. Compass sensor is used to detect direction and correct the motion accurately.
NQC program for above Rover
// following program makes the rover run in a square
// beginning at heading of 72 Degrees and then turning
// 90 degrees clockwise after that.
task main()
{
// set the port 1 to read as light
// where the compass sensor is connected.
SetSensor(SENSOR_1, SENSOR_LIGHT);
SetSensorMode(SENSOR_1, SENSOR_MODE_PERCENT);
PlaySound(SOUND_CLICK);
while(1)
{
ChangeHeadingTo(20,3); // set the direction to heading 72
// start motors to go forward
OnFwd(OUT_A);
OnFwd(OUT_C);
Wait(200); // keep the motors running.
// turn by 90 degrees clockwise (a change of 25)
ChangeHeadingTo(45,3);
// start motors to go forward
OnFwd(OUT_A);
OnFwd(OUT_C);
Wait(200); // keep the motors running.
// turn by 90 degrees clockwise (a change of 25)
ChangeHeadingTo(70,3);
OnFwd(OUT_A);
OnFwd(OUT_C);
Wait(200); // keep the motors running.
// turn by 90 degrees clockwise (a change of 25)
ChangeHeadingTo(95,3);
// start motors to go forward
OnFwd(OUT_A);
OnFwd(OUT_C);
Wait(200); // keep the motors running.
// stop
Off(OUT_A);
Off(OUT_C);
SetPower(OUT_A+OUT_C, 8);
}
}
void ChangeHeadingTo(int target_angle, int ERROR_MARGIN)
{
int error;
SetPower(OUT_A+OUT_C, 8);
while(1)
{
Wait(1);
error=target_angle-SENSOR_1 ; // get current heading error
if (error>50)
error=100-error;
if (error-ERROR_MARGIN)
{
// turn clockwise
OnRev(OUT_A);
OnFwd(OUT_C);
}
}
}