机器人制作开源方案|智能家居窗户机器人
窗户结构2.3系统设计本设计采用光敏传感器、近红外传感器、触碰传感器、雨滴传感器、烟雾传感器、蓝牙传感器、霍尔传感器结合Arduino单片机开发板实现对外界光强、红外线、雨滴、烟雾数据的监测,通过编程设定对环境感知还有认为蓝牙远程链接完成对窗户的关闭或打开。如下图所示为整体结构图:整体结构图2.4硬件设计...
STC89C52RC单片机8位流水灯程序
#defineucharunsignedchar/***数组定义并赋值***/ucharLED[]={0XFE,0XFD,0XFB,0XF7,0XEF,0XDF,0XBF,0X7F};/***延时子程序***/voiddelayms(uintxms){uinti,j;for(i=xms;i>0;i--)for(j=124;j>0;j--);}/***主程序***/voidmain(){ucharn;while(1...
单片机学习——独立按键之二
voiddisplay(ucharba,ucharsh,ucharg);ucharcodetabledu[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0x89,0x86,0xc7,0xc7,0xc0,0xff};ucharcodetablewe[]={0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};voidinit(...
AT89C51单片机定时器应用设计
while(temp!=0xf0)//temp高四位不等于1111,说明列线中有0,说明有键按下没松开(释放){temp=KEY_PORT;//读取P3口,送temptemp=temp&0xf0;//temp高四位不变(保存列值),低四位清零}}}//***KEY_PORT=0xfd;//P3口:11111101行1为低电平(0)temp=KEY_PORT;temp=temp&0xf0;wh...
30条单片机晶振的那些问题,解决你的麻烦
用51单片机的定时器做波特率发生器时,假如用11.0592Mhz的晶振,依据公式算下来须要定时器设置的值都是整数;假如用12Mhz晶振,则波特率都是有偏差的,假如9600,用定时器取0XFD,现实中波特率10000,一般波特率偏差在4%左右都是能够的,所以也还能用STC90C516晶振12M波特率9600,倍数时误差率6.99%,不倍数时误差率8.51%,...
89C52单片机之点阵使用
unsignedcharcodetaba[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};unsignedcharcodetabb[]={0x81,0x41,0x21,0x1f,0x05,0x85,0xfd,0x01,0x08,0xfc,0x03,0x04,0x1f,0x24,0x45,0xC6,0x89,0x4a,0x2c,0x0f,0x2c,0x4a,0x89,0x00,0xff,0x00,...
比较少见的夜视辅助系统拆解,看看都有哪些车规芯片
ID:0x5D7DATA:010302FFFFFFFFFFID:0x401DATA:0000210C01000000ID:0x302DATA:08181E5100280124ID:0x303DATA:140200FD00007F08ID:0x401DATA:0000210C01000000