241-基于stm32单片机智能坐垫座椅通风加热系统(源程序+原理图+元件清单)毕设实物资料

一:功能介绍:

1、系统组成:采用stm32f103c8t6核心板+DHT11温湿度+DS1302时钟模块+LCD1602显示屏+蜂鸣器+继电器+风扇+按键+LED
2、通过DHT11传感器采集温湿度,显示到LCD1602上面;
3、通过DS1302时钟模块读取当前时间,显示到LCD1602上面;
4、通过按键设置定时提醒时间,显示到LCD1602上面;
5、当温度低于15度(阈值程序可调),开启加热(LED模拟);
6、当湿度大于85%,开启继电器打开风扇进行通风排气;
7、当定时的时间到达,蜂鸣器开启进行提醒;

二:实物演示视频

241-基于stm32单片机智能坐垫座椅通风加热

三:程序代码展示(采用C语言编写,使用keil5编译,代码有中文注释,新手容易看懂)

 

void Display(void)
{
	char xxx=0,yyy=0;
	//T1 温度
	WrByte1602(0,1,'T'); //.
	WrByte1602(0,2,'='); //.		
	WrByte1602(0,3,AsciiCode[wendu%100/10]);
	WrByte1602(0,4,AsciiCode[wendu%10]);
	WrByte1602(0,5,'C');	
	//T2 湿度
	WrByte1602(0,8,'H'); //.
	WrByte1602(0,9,'='); //.		
	WrByte1602(0,10,AsciiCode[shidu%100/10]);
	WrByte1602(0,11,AsciiCode[shidu%10]);
	WrByte1602(0,12,'%');			

	xxx=0;yyy=1;

	
	WrByte1602(yyy,xxx++,AsciiCode[shi%100/10]);//时间显示
	WrByte1602(yyy,xxx++,AsciiCode[shi%10]);
	WrByte1602(yyy,xxx++,':');		

	WrByte1602(yyy,xxx++,AsciiCode[fen%100/10]);
	WrByte1602(yyy,xxx++,AsciiCode[fen%10]);
	WrByte1602(yyy,xxx++,':');	
	WrByte1602(yyy,xxx++,AsciiCode[miao%100/10]);
	WrByte1602(yyy,xxx++,AsciiCode[miao%10]);




	WrByte1602(yyy,xxx++,' ');	
	WrByte1602(yyy,xxx++,'T');		
	WrByte1602(yyy,xxx++,AsciiCode[xiaoshi%100/10]);//定时显示
	WrByte1602(yyy,xxx++,AsciiCode[xiaoshi%10]);
	WrByte1602(yyy,xxx++,':');		

	WrByte1602(yyy,xxx++,AsciiCode[fenzhong%100/10]);
	WrByte1602(yyy,xxx++,AsciiCode[fenzhong%10]);
	WrByte1602(yyy,xxx++,' ');	
	
}

int main(void)
{	
	//时钟配置
	SystemInit();		
	SystemCoreClockUpdate();
  //引脚配置
	GPIO_Configuration();
	//LCD1602初始化
	Init1602();
	NVICConfig();
	//RCC时钟开启
	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);
	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE);
	DS1302_Init();
	delay_ms(300);
	//DS1302_Write_Time();	//ds1302时间校准
	DS1302_Get_Time(time_data);	//读取时间	
		shi=time_data[9]*10+time_data[10];
		fen=time_data[11]*10+time_data[12];
		miao=time_data[13]*10+time_data[14];	
	xiaoshi=shi;
	fenzhong = fen+3;
	
	while (1)
	{		

		delay_ms(10);

				 //读取温湿度
				 DHT11_receive(&shidu,&wendu);
					DS1302_Get_Time(time_data);	//读取时间	
		shi=time_data[9]*10+time_data[10];
		fen=time_data[11]*10+time_data[12];
		miao=time_data[13]*10+time_data[14];			
         //显示全部参数
				 Display(); 
		
				 //按键扫描
				 anjiansaomiao();
     //定时时间到
     if(xiaoshi==shi && fenzhong==fen )
		 {
			 PBout(6)=0;//蜂鸣器闹铃打开
		 }
		 else   PBout(6)=1;//蜂鸣器闹铃关闭
		     
		if(wendu<15) PBout(5)=1;//温度低于15 开启加热
			else PBout(5)=0;
		 if(shidu>85)   PBout(1)=0;//湿度大于85  开启通风排气
		 else  PBout(1)=1;
		 
	}
}				  

四:原理图展示(采用AD(Altium Designer)打开)

 五:实物图展示:

六: 资料清单展示:

资料包百度网盘下载链接 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

电子工程DIY工作室

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值