Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832 EthernetInterface LM75B mbed-rtos mbed
Fork of app-board-LM75B by
main.cpp
- Committer:
- chris
- Date:
- 2014-02-06
- Revision:
- 5:608f2bf4d3f7
- Parent:
- 4:6df97cb10041
- Child:
- 6:77a4c45f6416
File content as of revision 5:608f2bf4d3f7:
#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 ()
{
    //Try to open the LM75B
    if (sensor.open()) {
        printf("Device detected!\n");
        while (1) {
            lcd.cls();
            lcd.locate(0,3);
            lcd.printf("Temp = %.3f\n", (float)sensor);
            wait(1.0);
        }
    } else {
        error("Device not detected!\n");
    }
}
            
    