tpl0401a
This commit is contained in:
@ -4,30 +4,32 @@
|
||||
#include <Arduino.h>
|
||||
#include "BH1750.h"
|
||||
#include "DS18B20.h"
|
||||
#include "MCP45HVX1.h"
|
||||
#include "DigitalPot.h"
|
||||
#include "INA226.h"
|
||||
#include <WiFi.h>
|
||||
#include "RunTime.h"
|
||||
|
||||
//陶晶池串口屏
|
||||
#define TJC Serial1
|
||||
#define TJC_TX_Pin 42
|
||||
#define TJC_RX_Pin 41
|
||||
// 定义陶晶池串口屏的串口和引脚
|
||||
#define TJC_SERIAL Serial1
|
||||
#define TJC_TX_PIN 42
|
||||
#define TJC_RX_PIN 41
|
||||
|
||||
class TJC_Show {
|
||||
public:
|
||||
TJC_Show(HardwareSerial& serial, DS18B20& sensor, BH1750& bh1750_a, BH1750& bh1750_b, MCP45HVX1& digiPot, INA226& INA);
|
||||
void TJC_Show_Init();
|
||||
TJC_Show(DS18B20& ds18b20, BH1750& bh1750_a, BH1750& bh1750_b, TPL0401A& digiPot, INA226& INA);
|
||||
void init();
|
||||
void showQR();
|
||||
void showINFO(unsigned long activeDuration);
|
||||
void showInfo();
|
||||
|
||||
private:
|
||||
HardwareSerial& _serial;
|
||||
DS18B20& _sensor;
|
||||
DS18B20& _ds18b20;
|
||||
BH1750& _bh1750_a;
|
||||
BH1750& _bh1750_b;
|
||||
MCP45HVX1& _digiPot;
|
||||
TPL0401A& _digiPot;
|
||||
INA226& _INA;
|
||||
void clearSerialBuffer();
|
||||
void sendCommand(const char* command);
|
||||
};
|
||||
|
||||
#endif // TJC_SHOW_H
|
||||
Reference in New Issue
Block a user