274【Complete Course Design】Design of Electric Water Heater Based on 51 Single Chip Microcomputer-Water Level-Bluetooth

[Resource Download] The download address is as follows:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

51 Electric Water Heater Design-Water Level-LCD1602-RELAY-Bluetooth-DS18B20

This design is composed of STC89C52 single-chip circuit + DS18B20 temperature sensor + LCD1602 liquid crystal display circuit + liquid level sensor circuit + Bluetooth module circuit + power supply circuit.

1. LCD1602 displays the current water temperature and the set water temperature threshold in real time.

2. When the liquid level is lower than the low water level, the relay 2 starts to close, and when the high water level is reached, the relay opens.

3. The water temperature threshold can be set via Bluetooth. Below the threshold, relay 1 is closed, above the threshold, relay 1 is open



unsigned long time2ms=0;	//定时计数
unsigned char DisFlag=0;		//更新显示标志

int temp1;
float temperature;
unsigned char ReadTempFlag=0;//定义读时间标志
unsigned int setTemp=30;         //温度阈值

unsigned char uartTimes=0;//串口上报计数
char dis0[16];//定义显示区域临时存储数组


unsigned char firstin =0;			  //首次接收到标志
unsigned char tab[7];				  //串口数据暂存
unsigned char Count=0;				  //串口接收计数
unsigned char  uartbusy =0;			  //串口判忙

void Init_Timer0(void);//函数命令
void UART_Init(void);
void SendByte(unsigned char dat);
void SendStr(unsigned char *s,unsigned char length);

 

Guess you like

Origin blog.csdn.net/theroadon/article/details/109261628