Class: Toybox.Sensor.SensorInfoIterator


A class encapsulating a collection of Sensors

The SensorIterator describes a collection of SensorInfo objects that describe actual sensors. Such an iterator is retrieved using the appropriate "get*Sensors' methods found in Sensor at the module level.


Gets a SensorIterator object for all registered external heart rate sensors on the device

using Toybox.Sensor;

function getHeartRateSensorIterator() {
    if (Sensor has :getRegisteredSensors) {
        return Sensor.getRegisteredSensors(Sensor.SENSOR_HEARTRATE);
    return null;


API Level 3.2.0

Instance Method Summary collapse

Instance Method Details

next() as Sensor.SensorInfo or Null

Get the current SensorInfo and advance.

Get the current SensorInfo and advance self to refer to the next.



API Level 3.2.0

Generated Apr 17, 2024 9:40:38 AM