Dallas

Dependencies:   DS18B20 mbed

Files at this revision

API Documentation at this revision

Comitter:
Edgar2016
Date:
Thu Sep 22 17:41:33 2016 +0000
Commit message:
Dallas

Changed in this revision

DS18B20.lib Show annotated file Show diff for this revision Revisions of this file
Dallas.cpp Show annotated file Show diff for this revision Revisions of this file
Dallas.h Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DS18B20.lib	Thu Sep 22 17:41:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Wimpie/code/DS18B20/#ad90c2e86a63
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Dallas.cpp	Thu Sep 22 17:41:33 2016 +0000
@@ -0,0 +1,8 @@
+Dallas::Dallas():
+_DS18B20(Dallas::pin, Dallas::crcOn, Dallas::useAddr, Dallas::parasitic, Dallas::Address){
+}
+
+float lerTemperatura(DS18B20 _DS18B20){
+    _DS18B20.setResolution();
+    _DS18B20.calculateTemperature();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Dallas.h	Thu Sep 22 17:41:33 2016 +0000
@@ -0,0 +1,22 @@
+#ifndef Dallas_H
+#define Dallas_H
+
+#include "mbed.h"
+#include "DS18B20.h"
+
+class Dallas{
+    static const PinName pin = D10;
+    static const bool crcOn;
+    static const bool useAddr;
+    static const bool parasitic;
+    static const unsigned char* Address;
+    
+    DS18B20 _DS18B20;
+    public:
+    Dallas();
+    ~Dallas();
+    float lerTemperatura(DS18B20 _DS18B20);
+    
+};
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 22 17:41:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file