温度センサのプログラム(第二版)です。 PCの画面に表示します。
Dependencies: mbed
Diff: main.cpp
- Revision:
- 4:8d32e5cf3af7
diff -r 694792b93731 -r 8d32e5cf3af7 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 18 05:52:37 2019 +0000 @@ -0,0 +1,10 @@ +#include "mbed.h" +#include "TMP102.h" + +TMP102 temp(p9, p10, 0x91); + +int main() { + + printf("Temp: %f\n\r", temp.read()); + + }