/* User task that triggers measurements of sensor1 every 2 seconds and uses  */
void user_task_sensor2(void *pvParameters)
/* User task that triggers measurements of sensor1 every 2 seconds and uses  */
void user_task_sensor2(void *pvParameters)
{
    bme680_values_float_t values;
    TickType_t last_wakeup = xTaskGetTickCount();
    while (1)
    {
        if (bme680_force_measurement (sensor2))
        {
            while (bme680_is_measuring (sensor2)) ;
            if (bme680_get_results_float (sensor2, &values))
                printf("%.3f BME680 Sensor2: %.2f °C, %.2f %%, %.2f hPa, %.2f Ohm\n",
                       (double)sdk_system_get_time()*1e-3,
                       values.temperature, values.humidity,
                       values.pressure, values.gas_resistance);
        }
        vTaskDelayUntil(&last_wakeup, 2000 / portTICK_PERIOD_MS);
    }
}