M0Board_WF
/
WF_mbed_UART_temp
a
main.cpp
- Committer:
- bulmenwt
- Date:
- 2015-01-28
- Revision:
- 0:d3c7895406b6
File content as of revision 0:d3c7895406b6:
#include "mbed.h" #include "LM75B.h" DigitalOut Led1(LED1); DigitalOut Led2(LED2); DigitalOut Led3(LED3); DigitalOut Led4(LED4); Serial fs(USBTX, USBRX); char ch; LM75B sensor(p28, p27) ; /// SCL, SCD int main() { if (sensor.open()) { fs.printf("Device detectedd!\r\n"); while(1) { Led4=1; wait(0.5); Led4=0; wait(0.5); fs.printf("Temperatur =%.3f\n\r",(float)sensor); wait(0.5); } } else { fs.printf("Device not found!\r\n"); } }