UPDATED
Dependencies: mbed Nucleo_Sensor_Shield
Diff: main.cpp
- Revision:
- 4:5fb25b7e78ba
- Parent:
- 3:53d2d440a695
--- a/main.cpp Wed Jan 30 03:03:58 2019 +0000 +++ b/main.cpp Fri Feb 15 06:36:00 2019 +0000 @@ -11,8 +11,13 @@ Ticker update; volatile float TEMPERATURE_C; +volatile float TEMPERATURE_F; +volatile float TEMPERATURE_K; +volatile float HUMIDITY; +volatile float PRESSURE; -<<<<<<<<Declarations should be here >>>>>>>>>> + + bool measurements_update = false; @@ -39,7 +44,12 @@ if(measurements_update == true){ /* Read the environmental sensors */ - <<<<<<<< your code should be here >>>>>>>>>> + Sensors->hts221.GetTemperature((float*)&TEMPERATURE_C); + Sensors->hts221.GetHumidity((float*)&HUMIDITY); + Sensors->lps25h.GetPressure((float*)&PRESSURE); + + + pc.printf("Temperature:\t %.2f C / %.2f F / %.2f K\r\n", TEMPERATURE_C, TEMPERATURE_F, TEMPERATURE_K);