Franz Wolf
/
app-board-LM75
BULME
Diff: main.cpp
- Revision:
- 6:4755c585b051
- Parent:
- 5:608f2bf4d3f7
--- a/main.cpp Thu Feb 06 14:05:51 2014 +0000 +++ b/main.cpp Tue Sep 17 08:52:59 2019 +0000 @@ -1,23 +1,17 @@ #include "mbed.h" #include "LM75B.h" -#include "C12832.h" - -C12832 lcd(p5, p7, p6, p8, p11); LM75B sensor(p28,p27); Serial pc(USBTX,USBRX); int main () { - + pc.baud(9600); //Try to open the LM75B if (sensor.open()) { - printf("Device detected!\n"); - + pc.printf("Device detected!\n"); while (1) { - lcd.cls(); - lcd.locate(0,3); - lcd.printf("Temp = %.3f\n", (float)sensor); + pc.printf("Temp = %.3f\n", (float)sensor.temp()); wait(1.0); }