UPDATED
Dependencies: mbed Nucleo_Sensor_Shield
Revision 4:5fb25b7e78ba, committed 2019-02-15
- Comitter:
- PurpleSkyMK
- Date:
- Fri Feb 15 06:36:00 2019 +0000
- Parent:
- 3:53d2d440a695
- Commit message:
- UPDATED
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 53d2d440a695 -r 5fb25b7e78ba main.cpp --- 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);