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.
Fork of HTU21D by
Revision 1:d7568a103ef5, committed 2014-10-19
- Comitter:
- alipford3
- Date:
- Sun Oct 19 18:24:53 2014 +0000
- Parent:
- 0:db86ad1b4459
- Child:
- 2:4fd07be6bad8
- Commit message:
- An updated basic library to interface with the HTU21D digital temperature and humidity sensor.
Changed in this revision
| HTU21D/HTU21D.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTU21D/HTU21D.cpp Fri Mar 28 14:55:03 2014 +0000
+++ b/HTU21D/HTU21D.cpp Sun Oct 19 18:24:53 2014 +0000
@@ -45,11 +45,11 @@
tx[0] = TRIGGER_TEMP_MEASURE; // Triggers a temperature measure by feeding correct opcode.
i2c_->write((HTU21D_I2C_ADDRESS << 1) & 0xFE, tx, 1);
- wait_ms(1);
+ wait_ms(50);
// Reads triggered measure
i2c_->read((HTU21D_I2C_ADDRESS << 1) | 0x01, rx, 2);
- wait_ms(1);
+ wait_ms(50);
// Algorithm from datasheet to compute temperature.
unsigned int rawTemperature = ((unsigned int) rx[0] << 8) | (unsigned int) rx[1];
