第一次同步

This commit is contained in:
2025-09-30 19:04:02 +08:00
parent 10350699d8
commit 5e938eaa70
19 changed files with 617 additions and 1 deletions

24
src/Switch/Switch.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef _SWITCH_H__
#define _SWITCH_H__
#include <Global/Variable.h>
class Switch
{
private:
byte ; //控制继电器使用的引脚
byte ; //反馈继电器使用的引脚
boolean ; //继电器状态
public:
Switch(byte ,byte ,boolean = LOW); //构造函数
~Switch(); //析构函数
void (); //初始化引脚
byte (); //获取控制的引脚
void (); //打开继电器
void (); //关闭继电器
void (); //切换继电器的状态
void (boolean state); //设置继电器的状态
boolean (); //获取继电器的状态
};
#endif