![](/media/cache/group/IMG_1289.JPG.50x50_q85.jpg)
test program for HIH6130, tested with MSS, MSU and FRDM-KL25Z
Revision 3:ea50121cc331, committed 2017-05-16
- Comitter:
- Rhyme
- Date:
- Tue May 16 02:36:40 2017 +0000
- Parent:
- 2:c169837a0d3e
- Commit message:
- start_CM/start_NOM have been tested, but to reduce confusion, test part is removed.
Changed in this revision
HIH6130.lib | Show annotated file Show diff for this revision Revisions of this file |
test_HIH6130.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HIH6130.lib Tue May 16 01:37:25 2017 +0000 +++ b/HIH6130.lib Tue May 16 02:36:40 2017 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/teams/MSS/code/HIH6130/#b5bedc9b6d04 +https://mbed.org/teams/MSS/code/HIH6130/#939573b6796d
--- 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) ; }