Files
LampControler/src/TJC_Show.h
2025-02-12 11:38:33 +08:00

35 lines
732 B
C++

#ifndef TJC_SHOW_H
#define TJC_SHOW_H
#include <Arduino.h>
#include "BH1750.h"
#include "DS18B20.h"
#include "DigitalPot.h"
#include "INA226.h"
#include <WiFi.h>
#include "RunTime.h"
// 定义陶晶池串口屏的串口和引脚
#define TJC_SERIAL Serial1
#define TJC_TX_PIN 42
#define TJC_RX_PIN 41
class TJC_Show {
public:
TJC_Show(DS18B20& ds18b20, BH1750& bh1750_a, BH1750& bh1750_b, TPL0401A& digiPot, INA226& INA);
void init();
void showQR();
void showInfo();
private:
HardwareSerial& _serial;
DS18B20& _ds18b20;
BH1750& _bh1750_a;
BH1750& _bh1750_b;
TPL0401A& _digiPot;
INA226& _INA;
void clearSerialBuffer();
void sendCommand(const char* command);
};
#endif // TJC_SHOW_H