MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / getTemperature

Method getTemperature

modules/drivers/bmp180/bmp180.js:97–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 return this.write(BMP180_REG_CONTROL, BMP180_COMMAND_TEMPERATURE);
96 }
97 getTemperature() {
98 let data = this.readBytes(BMP180_REG_RESULT, 2);
99
100 let tu = (data[0] * 256.0) + data[1];
101 let a = this.c5 * (tu - this.c6);
102 return a + (this.mc / (a + this.md));
103 }
104
105 startPressure() {
106 return this.write(BMP180_REG_CONTROL, BMP180_COMMAND_PRESSURE0);

Callers 2

sampleMethod · 0.95
main.jsFile · 0.45

Calls 1

readBytesMethod · 0.95

Tested by

no test coverage detected