Part One of my Project Course. Implementation of simple I/O and a custom defined protocol over UDP/IP.

Dependencies:   C12832 LM75B mbed EthernetInterface mbed-rtos

Revision:
0:88d3b9015f7c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/temperature.cpp	Mon Feb 26 11:25:59 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "LM75B.h"
+#include "C12832.h"
+#include "temperature.h"
+
+namespace ProjectOne{
+    
+    Temperature::Temperature(PinName firstPin, PinName secondPin) : sensor(firstPin,secondPin){
+        
+    }
+
+    float Temperature::readTemperature(void){
+        if (sensor.open()) {
+            return (float)sensor.temp();
+        }else{
+            return -1;
+        }
+    }
+
+}
\ No newline at end of file