[FTC]: Compass Sensor

My team is using a compass sensor during autonomous, or trying to… I have tested the sensor on a different robot and it worked correctly, moving forward, then turning, then moving forward again. Our theory for the sensor not working is that the motors are magnetic and not letting the values change at all. If someone has had the compass sensor work on the FTC platform can they post their motor and sensor setup along with a valid segment of code that works

How close is the sensor to the motors.

Also consider that the NXT messes up the compass sensor. Stay about 4 to 5 inches from both to be safe. Probably 6 inches away from the motor.

we took that into consideration, but even when i tried to hold the compass completely away from the robot like 1ft. and move with it it still did not work. Does the FTC platform for robot c mess it up?

Mine works perfectly with RobotC, I just wish it gave relative values as well as absolute values. Your compass sensor should be 8-10" away from the NXT, motors, and controllers. Make sure the sensor wire isn’t wrapped or curled around the sensor, it should be smoothly distancing away from the sensor. Make sure the black nose of the sensor is facing a wall, not the ceiling. The sensor should be in horizontal orientation, not vertical.

Run the sample code “Compass_Sensor_Demo.c” found in C:\Program Files\Robotics Academy\ROBOTC for Mindstorms\Sample Programs\NXT\FTCTraining Programs

for us, the compass was really useless, and wasted quite alot of our time. it is just way too sensitive i guess. ours were mounted on a beam for testing purposes, 10 inches away from the motor and brick and battery. it works, but not precise enough to be of any use. and what more, is that the exact same program would work on one side of the field, but not the other. and the field is at least 2 feet away from any walls.

As for relative, I suppose you could do something where you take the reading, and make a variable with the value of the reading.