Example program for app shield using the LM75 temperature sensor

Dependencies:   C12832 LM75B

Fork of app-shield-LM75B by Chris Styles

main.cpp

Committer:
sarahmarshy
Date:
2017-09-19
Revision:
10:e235b9af31b2
Parent:
8:e0f3f151c3cc

File content as of revision 10:e235b9af31b2:

#include "mbed.h"
#include "LM75B.h"
#include "C12832.h"

// Using Arduino pin notation
C12832 lcd(D11, D13, D12, D7, D10);
LM75B sensor(D14,D15);

int main ()
{
    while (1) {
        lcd.cls();
        lcd.locate(0,3);
        lcd.printf("Temp = %.1f\n", sensor.temp());
        wait(1.0);
    }
}