ADT7410 or TMP102 with mbed HRM1017 sample program konashi.js http://jsdo.it/micutil/7GnE
Dependencies: ADT7410 BLE_API_Native_IRC TMP102 mbed
Fork of BLE_Health_Thermometer_IRC by
konashi.jsを使う場合 http://jsdo.it/micutil/7GnE
techBASICを使う場合 https://www.dropbox.com/s/q5vuqmdr7o8r9v0/ADT7410.txt
I2C温度計:ADT7410またはTMP102を使って mbed HRM1017で温度を表示させるサンプルプログラムです
ADT7410:秋月 http://akizukidenshi.com/catalog/g/gM-06675/ で購入できます。
TMP102:スイッチサイエンス http://www.switch-science.com/catalog/1474/ で購入できます。
mbed HRM1017 http://www.switch-science.com/catalog/1755/
mbedのコード http://mbed.org/users/micono/code/BLE_ADT7410_TMP102_Sample/
ADT7410を使う場合:UseADT7410 1
TMP102を使う場合:UseADT7410 0
konashi.jsを使う場合:KONASHI 1
nRF Toolboxを使う場合:KONASHI 0
ADT7410配線図 /media/uploads/micono/adt7410mbedhrm1017.jpg
Revision 7:b576848f8800, committed 2014-07-21
- Comitter:
- micono
- Date:
- Mon Jul 21 06:48:12 2014 +0000
- Parent:
- 6:58ac5eb16aec
- Commit message:
- fixed i2c bus speed from 400 to 400000
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 58ac5eb16aec -r b576848f8800 main.cpp --- a/main.cpp Sun Jul 20 04:04:22 2014 +0000 +++ b/main.cpp Mon Jul 21 06:48:12 2014 +0000 @@ -22,7 +22,7 @@ #define UseADT7410 1 #if UseADT7410 #include "ADT7410.h" - ADT7410 healthThemometer(p22, p20, 0x90, 400); + ADT7410 healthThemometer(p22, p20, 0x90, 400000); #else #include "TMP102.h" TMP102 healthThemometer(p22, p20, 0x90); /* The TMP102 connected to our board */ @@ -38,9 +38,6 @@ DigitalOut advertisingStateLed(LED2); /* LED2 is on when we are advertising, otherwise off. */ - - - #define KONASHI 1 #if KONASHI /* Health Thermometer Service */