lu sheng
/
Nucleo103_i2c_master_LM75_OK
nucleo 103r LM75A
Diff: main.cpp
- Revision:
- 0:b593e5481b36
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 20 01:52:09 2017 +0000 @@ -0,0 +1,16 @@ +//Nucleo F103RB+LM75A, +//LM75A A0,A1,A2 connect to Gnd ,so the addr of this lm75a is 0x0000 +//Os NC +// +#include "mbed.h" +#include "LM75B.h" + +LM75B tmp(D14,D15);//D14,D15 =p28,p27 +Serial pc(USBTX,USBRX); +int main () +{ + while (1) { + pc.printf("%.2f\n",tmp.read()); + wait(1.0); + } +} \ No newline at end of file