-
Notifications
You must be signed in to change notification settings - Fork 16
Barometer
patrickkulling edited this page Sep 30, 2011
·
2 revisions
Before you starting to use the Barometer sensor make sure the device supports this sensor type via:
if (Barometer.isSupported())
{
barometer = new Barometer();
}
Sets the frequency in ms in which you wanted to receive status updates. Whenever a status update occurs, the sensor will fires an BarometerEvent.UPDATE.
barometer.setRequestedUpdateInterval(1000);
barometer.addEventListener(BarometerEvent.UPDATE, handleBarometerUpdate);
Retrieve the power in mA used by this sensor while in use.
Retrieve maximum range of the sensor in the sensor's unit. (hPa)
Retrieve resolution of the sensor in the sensor's unit. (hPa)
Call this function if you don't need the class anymore to free your memory.