Example program for app shield using the LM75 temperature sensor

Dependencies:   C12832 LM75B mbed

Fork of app-board-LM75B by Chris Styles

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "LM75B.h"
00003 #include "C12832.h"
00004 
00005 // Using Arduino pin notation
00006 C12832 lcd(D11, D13, D12, D7, D10);
00007 LM75B sensor(D14,D15);
00008 
00009 int main ()
00010 {
00011     while (1) {
00012         lcd.cls();
00013         lcd.locate(0,3);
00014         lcd.printf("Temp = %.1f\n", sensor.temp());
00015         wait(1.0);
00016     }
00017 }