MSS
/
test_HIH6130
test program for HIH6130, tested with MSS, MSU and FRDM-KL25Z
Diff: test_HIH6130.cpp
- Revision:
- 3:ea50121cc331
- Parent:
- 2:c169837a0d3e
--- a/test_HIH6130.cpp Tue May 16 01:37:25 2017 +0000 +++ b/test_HIH6130.cpp Tue May 16 02:36:40 2017 +0000 @@ -6,18 +6,18 @@ HIH6130 *hih6130 = 0 ; int main() { - uint16_t status = 0 ; float humidity = 0 ; float temperature = 0 ; + hih6130 = new HIH6130(PIN_SDA, PIN_SCL, HIH6130_I2C_ADDRESS) ; - + printf("=== test HIH6130 for %s (%s) ===\n", BOARD_NAME, __DATE__) ; printf("Temperature(c), Humidity(%%)\n") ; while(1) { hih6130->measure() ; wait(0.5) ; - status = hih6130->getValue(&humidity, &temperature) ; + hih6130->getValue(&humidity, &temperature) ; printf("%.1f, %.1f\n", temperature, humidity) ; wait(1) ; }