Aqueles Que Não Sabem O Que Fazem
/
DallasTemperature
Dallas
Revision 0:c2bc9c47c922, committed 2016-09-22
- Comitter:
- Edgar2016
- Date:
- Thu Sep 22 17:41:33 2016 +0000
- Commit message:
- Dallas
Changed in this revision
diff -r 000000000000 -r c2bc9c47c922 DS18B20.lib --- /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
diff -r 000000000000 -r c2bc9c47c922 Dallas.cpp --- /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
diff -r 000000000000 -r c2bc9c47c922 Dallas.h --- /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
diff -r 000000000000 -r c2bc9c47c922 mbed.bld --- /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