Neil Thiessen
/
LM75B_HelloWorld
A simple serial test program for the LM75B library.
main.cpp
- Committer:
- neilt6
- Date:
- 2013-08-14
- Revision:
- 0:578bc3c56500
- Child:
- 1:94af70628683
File content as of revision 0:578bc3c56500:
#include "mbed.h" #include "LM75B.h" LM75B sensor(p28, p27, LM75B::ADDRESS_0); int main() { while (1) { //Read the temperature float temp = sensor.temp(); //Print the temperature printf("Temp = %.3f\n", temp); //Sleep for 0.5 seconds wait(0.5); } }