Loading include/driver/hdc1080.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ class HDC1080 { float getRH(); unsigned int getManufacturerID(); void init(); void measure(); void heater(bool on); }; Loading src/app/datalogger/main.cc +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ void loop(void) hdc1080.getTemp(); } */ hdc1080.measure(); arch.delay_ms(10); kout << "HDC1080 temperature " << hdc1080.getTemp() << " degC" << endl; kout << "HDC1080 humidity " << hdc1080.getRH() << " %H" << endl; #endif Loading Loading @@ -253,6 +255,7 @@ int main(void) #ifdef CONFIG_driver_mpu9250 mpu9250.init(); mpu9250.nineAxis(); #endif #ifdef CONFIG_driver_tsl2591 Loading src/driver/hdc1080.cc +5 −9 Original line number Diff line number Diff line Loading @@ -11,14 +11,15 @@ #include "driver/soft_i2c.h" #endif float HDC1080::getTemp() void HDC1080::measure() { txbuf[0] = 0x00; i2c.xmit(address, 1, txbuf, 0, rxbuf); } arch.delay_ms(10); float HDC1080::getTemp() { txbuf[0] = 0x00; i2c.xmit(address, 0, txbuf, 2, rxbuf); return (((unsigned int)rxbuf[0] << 8) | rxbuf[1]) * .00251770019531250000 - 40.; Loading @@ -27,11 +28,6 @@ float HDC1080::getTemp() float HDC1080::getRH() { txbuf[0] = 0x01; i2c.xmit(address, 1, txbuf, 0, rxbuf); arch.delay_ms(10); i2c.xmit(address, 0, txbuf, 2, rxbuf); return (((unsigned int)rxbuf[0] << 8) | rxbuf[1]) * .00152587890625000000; Loading Loading
include/driver/hdc1080.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ class HDC1080 { float getRH(); unsigned int getManufacturerID(); void init(); void measure(); void heater(bool on); }; Loading
src/app/datalogger/main.cc +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ void loop(void) hdc1080.getTemp(); } */ hdc1080.measure(); arch.delay_ms(10); kout << "HDC1080 temperature " << hdc1080.getTemp() << " degC" << endl; kout << "HDC1080 humidity " << hdc1080.getRH() << " %H" << endl; #endif Loading Loading @@ -253,6 +255,7 @@ int main(void) #ifdef CONFIG_driver_mpu9250 mpu9250.init(); mpu9250.nineAxis(); #endif #ifdef CONFIG_driver_tsl2591 Loading
src/driver/hdc1080.cc +5 −9 Original line number Diff line number Diff line Loading @@ -11,14 +11,15 @@ #include "driver/soft_i2c.h" #endif float HDC1080::getTemp() void HDC1080::measure() { txbuf[0] = 0x00; i2c.xmit(address, 1, txbuf, 0, rxbuf); } arch.delay_ms(10); float HDC1080::getTemp() { txbuf[0] = 0x00; i2c.xmit(address, 0, txbuf, 2, rxbuf); return (((unsigned int)rxbuf[0] << 8) | rxbuf[1]) * .00251770019531250000 - 40.; Loading @@ -27,11 +28,6 @@ float HDC1080::getTemp() float HDC1080::getRH() { txbuf[0] = 0x01; i2c.xmit(address, 1, txbuf, 0, rxbuf); arch.delay_ms(10); i2c.xmit(address, 0, txbuf, 2, rxbuf); return (((unsigned int)rxbuf[0] << 8) | rxbuf[1]) * .00152587890625000000; Loading