Hello, I am doing a very easy application in order to shop TIme, altitude and temperature on VH3 sdk2.4.
function initialize() {
AppBase.initialize();
// Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method(:onPosition));
Sensor.setEnabledSensors( [Sensor.SENSOR_TEMPERATURE] );
Sensor.setEnabledSensors( [Sensor.SENSOR_HEARTRATE] );
Sensor.enableSensorEvents( method( :onSensor ) );
}
----
function onSensor(sensorInfo) {
System.println( "Heart Rate: " + sensorInfo.heartRate );
System.println( "TEmp: " + sensorInfo.temperature );
System.println( "Alt: " + sensorInfo.altitude );
}
the resul is that is
Heart Rate: null
TEmp: null
Alt: -17.998905
Where I am wrong ? :)