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 |
---|---|
int |
getValue()
Returns the compass direction.
|
void |
startCalibration()
Starts calibration process.
|
void |
stopCalibration()
Stops calibration process.
|
public HTCompassSensor(SensorPort port)
port
- the port where the sensor is plugged-inpublic HTCompassSensor()
public int getValue()
public void startCalibration()
stopCalibration()
public void stopCalibration()
startCalibration()