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 LM75B mbed EthernetInterface mbed-rtos
temperature.cpp
00001 #include "mbed.h" 00002 #include "LM75B.h" 00003 #include "C12832.h" 00004 #include "temperature.h" 00005 00006 namespace ProjectOne{ 00007 00008 Temperature::Temperature(PinName firstPin, PinName secondPin) : sensor(firstPin,secondPin){ 00009 00010 } 00011 00012 float Temperature::readTemperature(void){ 00013 if (sensor.open()) { 00014 return (float)sensor.temp(); 00015 }else{ 00016 return -1; 00017 } 00018 } 00019 00020 }
Generated on Sat Jul 23 2022 22:59:36 by
1.7.2