Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: AMS_CCS811_gas_sensor AMS_CCS811_gas_sensor
Diff: AMS_ENS210.cpp
- Revision:
- 2:f5a7883ae9c2
- Parent:
- 1:94a79c88c105
- Child:
- 3:3b427231e5a7
--- a/AMS_ENS210.cpp Tue Jan 17 14:26:34 2017 +0000 +++ b/AMS_ENS210.cpp Wed Jan 18 08:54:58 2017 +0000 @@ -139,7 +139,7 @@ i2c_read(SENS_TEMP, output, 3); // do crc7 - if (output[3] & 1) // bit 0 of byte 3 is the valid flag + if (output[2] & 1) // bit 0 of byte 3 is the valid flag reading = 0 | output[0] | (output[1] << 8); // bytes 1 and 2 make the 16 bit data } @@ -156,7 +156,7 @@ i2c_read(SENS_HUMID, output, 3); // do crc7 - if (output[3] & 1) // bit 0 of byte 3 is the valid flag + if (output[2] & 1) // bit 0 of byte 3 is the valid flag reading = 0 | output[0] | (output[1] << 8); // bytes 1 and 2 make the 16 bit data }