public class HTCompassSensor extends Sensor
Constructor and Description |
---|
HTCompassSensor()
Creates a sensor instance connected to port S1.
|
HTCompassSensor(SensorPort port)
Creates a sensor instance connected to the given port.
|
Modifier and Type | Method and Description |
---|---|
lejos.hardware.sensor.HiTechnicCompass |
getLejosSensor()
Returns the reference of the the underlying
lejos.hardware.sensor.HiTechnicCompass.
|
int |
getValue()
Returns the compass direction.
|
void |
startCalibration()
Starts calibration process.
|
void |
stopCalibration()
Stops calibration process.
|
getLejosPort
public HTCompassSensor(SensorPort port)
port
- the port where the sensor is plugged-inpublic HTCompassSensor()
public lejos.hardware.sensor.HiTechnicCompass getLejosSensor()
public int getValue()
public void startCalibration()
stopCalibration()
public void stopCalibration()
startCalibration()