mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
compiling version
This commit is contained in:
35
include/items/SensorDallas.h
Normal file
35
include/items/SensorDallas.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
extern DallasTemperature sensors;
|
||||
extern OneWire* oneWire;
|
||||
|
||||
class SensorDallas;
|
||||
|
||||
typedef std::vector<SensorDallas> MySensorDallasVector;
|
||||
|
||||
class SensorDallas {
|
||||
public:
|
||||
|
||||
SensorDallas(unsigned long period,unsigned int pin, uint8_t deviceAddress, String key);
|
||||
~SensorDallas();
|
||||
|
||||
void loop();
|
||||
|
||||
private:
|
||||
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long _period;
|
||||
String _key;
|
||||
unsigned int _pin;
|
||||
uint8_t _deviceAddress;
|
||||
|
||||
void readDallas();
|
||||
|
||||
};
|
||||
|
||||
extern MySensorDallasVector* mySensorDallas2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user