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 LSM6DS3 by
Diff: LSM6DS3.cpp
- Revision:
- 3:a8a6b2456e93
- Parent:
- 2:ed14e6196255
--- a/LSM6DS3.cpp Tue Jun 21 20:51:25 2016 +0000
+++ b/LSM6DS3.cpp Sat Sep 29 20:14:06 2018 +0000
@@ -147,30 +147,6 @@
intr = (float)data[0];
}
-void LSM6DS3::readTemp()
-{
- // The data we are going to read from the temp
- char data[2];
-
- // Set addresses
- char subAddressL = OUT_TEMP_L;
- char subAddressH = OUT_TEMP_H;
-
- // Write the address we are going to read from and don't end the transaction
- i2c.write(xgAddress, &subAddressL, 1, true);
- // Read in register containing the temperature data and alocated to the correct index
- i2c.read(xgAddress, data, 1);
-
- i2c.write(xgAddress, &subAddressH, 1, true);
- i2c.read(xgAddress, (data + 1), 1);
-
- // Temperature is a 12-bit signed integer
- temperature_raw = data[0] | (data[1] << 8);
-
- temperature_c = (float)temperature_raw / 16.0 + 25.0;
- temperature_f = temperature_c * 1.8 + 32.0;
-}
-
void LSM6DS3::readGyro()
{
