case APP_SENSOR_STATE_USB_PRINT : /* TODO -----> Step #10c */ /* Convert and store temperature value */ tmp = appSensorData.i2c.i2cRxBuffer[0] << 8 | appSensorData.i2c.i2cRxBuffer[1]; appSensorData.i2c.lastValueRead = (tmp >> 7) * 0.5; /* Clean i2cRxBuffer */ appSensorData.i2c.i2cRxBuffer[0] = 0; appSensorData.i2c.i2cRxBuffer[1] = 0; appSensorData.i2c.i2cRxBuffer[2] = 0; /* Print on CDC USB */ SYS_DEBUG_PRINT(SYS_ERROR_DEBUG, "Temperature : %f C\r\n", appSensorData.i2c.lastValueRead); /* Lab 2 - Step #1 */ APP_SDCARD_Notify(appSensorData.i2c.lastValueRead); /* Go back to IDLE state */ appSensorData.state = APP_SENSOR_STATE_IDLE; break;