начинает создавать библиотеку HA
This commit is contained in:
3
include/DHTSensor.h
Normal file
3
include/DHTSensor.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
class DHTSensor {}
|
37
include/IRLight.h
Normal file
37
include/IRLight.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <IRremoteESP8266.h>
|
||||
#include <IRsend.h>
|
||||
|
||||
class IRLight {
|
||||
private:
|
||||
bool state;
|
||||
IRsend *irsend;
|
||||
|
||||
const uint16_t rawDataOn[67] = {
|
||||
8980, 4420, 580, 520, 630, 470, 630, 520, 580, 520, 630, 470,
|
||||
630, 520, 580, 520, 630, 1570, 630, 1620, 580, 1620, 630, 1620,
|
||||
580, 1570, 680, 1570, 630, 1570, 630, 1570, 630, 520, 630, 1570,
|
||||
630, 470, 630, 520, 630, 470, 630, 470, 630, 470, 680, 470,
|
||||
630, 470, 630, 520, 630, 1570, 630, 1570, 630, 1620, 630, 1570,
|
||||
630, 1570, 630, 1570, 680, 1570, 630};
|
||||
|
||||
const uint16_t rawDataOff[67] = {
|
||||
8980, 4370, 680, 420, 730, 420, 680, 420, 680, 420, 730, 420,
|
||||
680, 420, 680, 420, 730, 1470, 730, 1520, 680, 1520, 730, 1470,
|
||||
730, 1470, 730, 1520, 680, 1520, 730, 1470, 730, 420, 680, 470,
|
||||
680, 1470, 730, 420, 680, 1520, 730, 1470, 730, 420, 680, 420,
|
||||
680, 470, 580, 1620, 630, 470, 630, 1570, 630, 520, 580, 520,
|
||||
630, 1570, 680, 1520, 730, 1520, 680};
|
||||
|
||||
public:
|
||||
IRLight(int pin);
|
||||
IRLight(IRsend *irsend);
|
||||
void on();
|
||||
void off();
|
||||
void begin();
|
||||
|
||||
bool getState();
|
||||
|
||||
~IRLight();
|
||||
};
|
Reference in New Issue
Block a user