mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Добавляем файлы модуля Display TM1637 в систему на базе уже существующего LCD
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
#define EnableTelegram
|
||||
#define EnableUart
|
||||
#define EnableSensorLCD2004
|
||||
#define EnableSensorTM1637
|
||||
#endif
|
||||
|
||||
#ifdef GATE_MODE
|
||||
|
||||
40
include/items/vSensorTM1637.h
Normal file
40
include/items/vSensorTM1637.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifdef EnableSensorTM1637
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include <OneWire.h>
|
||||
#include "Global.h"
|
||||
#include "LiquidCrystal_I2C.h"
|
||||
|
||||
|
||||
class SensorTM1637;
|
||||
|
||||
typedef std::vector<SensorTM1637> MySensorTM1637Vector;
|
||||
|
||||
class SensorTM1637 {
|
||||
public:
|
||||
SensorTM1637(String key, unsigned long interval, unsigned int x, unsigned int y, String val, String descr);
|
||||
~SensorTM1637();
|
||||
|
||||
void loop();
|
||||
void writeTM1637();
|
||||
void execute(String command);
|
||||
String _key;
|
||||
void printBlankStr(int strSize);
|
||||
|
||||
private:
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
|
||||
unsigned long _interval;
|
||||
unsigned int _x;
|
||||
unsigned int _y;
|
||||
String _val;
|
||||
String _descr;
|
||||
int _prevStrSize;
|
||||
};
|
||||
|
||||
extern MySensorTM1637Vector* mySensorTM16372;
|
||||
|
||||
extern void TM1637();
|
||||
#endif
|
||||
Reference in New Issue
Block a user