import lejos.nxt.addon.*; import lejos.nxt.*; import lejos.robotics.navigation.*; /** calibrate compass sensor @author Bagnall, course text, p. 324 @author adapted by Sharon Tuttle @version 2015-04-03 */ public class CalibrateCompass { /** calibrate compass sensor p. 324 - "Once this code is executed, the calibration settings are stored in non-volatile memory on the sensor, so you won't have to rerun the calibration when you turn in NXT brick off." ...allegedly... @param args not used */ public static void main(String[] args) { CompassHTSensor compassSens = new CompassHTSensor(SensorPort.S1); CompassPilot hector = new CompassPilot(compassSens, 4.32F, 15.5F, Motor.B, Motor.C, true); hector.calibrate(); } }