Simon
Simon

Reputation: 349

ConnectIQ: Access of internal sensors

I want to develop an application with eclipse project type "Watch-App".

Basically I'm interested to get the Temperature and Speed without any external sensor. My watch (Fenix 3) should support this actually.

I made a little test application.

Code:

//! Constructor
function initialize()
{
    Snsr.setEnabledSensors( [Snsr.SENSOR_TEMPERATURE] );
    Snsr.enableSensorEvents( method(:onSnsr) );
    string_HR = "---temp";
}

function onSnsr(sensor_info)
{
    var HR = sensor_info.temperature;
    var bucket;
    if( sensor_info.temperature != null )
    {
        string_HR = HR.toString().substring(0, 2) + " temp";
        //Add value to graph
        HR_graph.addItem(HR);
    }
    else
    {
        string_HR = "temp";
    }

    Ui.requestUpdate();
}

Question: How can I access the internal sensors of the watch?

Upvotes: 0

Views: 993

Answers (2)

Travis Vitek
Travis Vitek

Reputation: 226

Unfortunately, ConnectIQ doesn't expose the temperature as determined by the built-in sensors. It only works with ANT+ temperature sensors (i.e., the Garmin Tempe) at the moment.

Upvotes: 3

DweebsUnited
DweebsUnited

Reputation: 158

Currently there is not a way for apps to access the internal sensors. This has been a hugely requested feature though, so hopefully it will get added in to Toybox soon. It would be fun to get to play with the IMU, temperature, and such.

Upvotes: 2

Related Questions