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?
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.