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: mbed mbed-STM32F103C8T6 OneWireCRC_LoRa_Node SX1276Lib_LoRa_Node
Diff: Thermometer.h
- Revision:
- 0:cc04364f049a
- Child:
- 1:a54ff5e2c2f3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Thermometer.h Thu Apr 19 14:09:56 2018 +0000 @@ -0,0 +1,34 @@ +#ifndef THERMOMETER_H +#define THERMOMETER_H + +#include "mbed.h" +#include "Board.h" +#include "DS18B20.h" +#include "DS18S20.h" +#include "OneWireDefs.h" + +#define THERMOMETER DS18B20 +#define THERMOMETER_CRC_ON true +#define THERMOMETER_USE_ADDR true +#define THERMOMETER_PARASITIC false +#define THERMOMETER_RESOLUTION twelveBit + +//#define MAX_MESSAGE_LENGTH + +class Thermometer +{ +private: + THERMOMETER thermometer; /**< Teplomer na pine D6 */ + Ticker thermometerTicker; + volatile float meassuredValue; +// char messageToSend[] + + void OnSampleTick(); +public: + Thermometer(bool crcOn, bool useAddr, bool parasitic, PinName pin); + void Init(); + void StartPeriodicMeassure(float timeSec); + +}; + +#endif \ No newline at end of file