Example program for app shield using the LM75 temperature sensor

Dependencies:   C12832 LM75B mbed

Fork of app-board-LM75B by Chris Styles

Committer:
chris
Date:
Wed Jun 08 10:36:09 2016 +0000
Revision:
9:f85504b3c707
Parent:
8:e0f3f151c3cc
Updated to latest library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
okano 0:ce7a8546502b 1 #include "mbed.h"
chris 2:9e757151de9b 2 #include "LM75B.h"
chris 5:608f2bf4d3f7 3 #include "C12832.h"
okano 0:ce7a8546502b 4
chris 6:bb84f3ab523d 5 // Using Arduino pin notation
chris 6:bb84f3ab523d 6 C12832 lcd(D11, D13, D12, D7, D10);
chris 8:e0f3f151c3cc 7 LM75B sensor(D14,D15);
okano 0:ce7a8546502b 8
chris 2:9e757151de9b 9 int main ()
okano 0:ce7a8546502b 10 {
chris 6:bb84f3ab523d 11 while (1) {
chris 6:bb84f3ab523d 12 lcd.cls();
chris 6:bb84f3ab523d 13 lcd.locate(0,3);
chris 8:e0f3f151c3cc 14 lcd.printf("Temp = %.1f\n", sensor.temp());
chris 6:bb84f3ab523d 15 wait(1.0);
chris 2:9e757151de9b 16 }
okano 0:ce7a8546502b 17 }