基于单片机自动烘干衣架系统设计(毕设课设)
自动烘干衣架
对烘干衣架,加重力感应器,感光,同时满足无光,有重量时烘干机运作,且有光时衣架布罩落下,无光时升起
#include "reg52.h"
#include "1602.h"
#include "key.h"
#include "delay.h"
#include "hx711.h"
#include "typedef.h"
sbit RLED = P1^0;
sbit GLED = P1^1; //绿色LED
sbit LIG = P1^3; //光强感应
sbit RELAY =P3^7;
/*--------------------------称重变量-----------------------------*/
long HX711_Buffer = 0; //AD结果
long Tare = 0; //皮重
float Weight=0;
float AverWeight=0; //求平均之后的重量
void Get_Tare(); //皮重
uint Get_Weight();
void TimerInit(void);
void WeightCheck(void); //实时称重
void PageInit(void);
uint SetWeight=1000;
code uchar Zheng[8]={0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09}; //四相八拍正转编码
code uchar Fan[8] ={0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08}; //四相八拍反转编码
uchar Y_RunFlag=0; //运行标志0静止 1正 2反
uint Step=0;
【资源下载】下载地址如下(787):https://docs.qq.com/doc/DTlRSd01BZXNpRUxl