├── SYSTEM ├── sys.c ├── sys.h ├── delay.c └── delay.h ├── User └── main.c ├── DRIVES ├── Smoke.c ├── keys.c ├── keys.h ├── Infrared.c ├── Infrared.h ├── LCD12864.c ├── LCD12864.h └── Smoke.h ├── .gitignore └── README.md /SYSTEM/sys.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/SYSTEM/sys.c -------------------------------------------------------------------------------- /SYSTEM/sys.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/SYSTEM/sys.h -------------------------------------------------------------------------------- /User/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/User/main.c -------------------------------------------------------------------------------- /DRIVES/Smoke.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/Smoke.c -------------------------------------------------------------------------------- /DRIVES/keys.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/keys.c -------------------------------------------------------------------------------- /DRIVES/keys.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/keys.h -------------------------------------------------------------------------------- /SYSTEM/delay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/SYSTEM/delay.c -------------------------------------------------------------------------------- /DRIVES/Infrared.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/Infrared.c -------------------------------------------------------------------------------- /DRIVES/Infrared.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/Infrared.h -------------------------------------------------------------------------------- /DRIVES/LCD12864.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/LCD12864.c -------------------------------------------------------------------------------- /DRIVES/LCD12864.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CONG2019/SmartHome/HEAD/DRIVES/LCD12864.h -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /OBJ 2 | *.m51 3 | *.plg 4 | *.uvopt 5 | *.uvproj 6 | *.bak 7 | *.lst 8 | *.a51 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SmartHome 2 | 智能家居 3 | 项目主要包括密码锁,有毒气体报警,有毒气体浓度显示,人体热释电报警等。 4 | 每个硬件模块都有对应的软件驱动,欢迎来移植! 5 | 驱动主要包括:1. 9*9键盘驱动(用扫面方式读取键盘) 6 | 2. LCD12864驱动 7 | 3. 烟雾传感器驱动 8 | 4. 人体红外热释电驱动 9 | -------------------------------------------------------------------------------- /SYSTEM/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef __DELAY_H__ 2 | #define __DELAY_H__ 3 | 4 | #include "sys.h" 5 | 6 | void init_delay(); 7 | void delay_min10us(u16 t); 8 | //void delay_max255us(u8 t); 9 | void delay_ms1(); 10 | void delay_ms(u16 t); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /DRIVES/Smoke.h: -------------------------------------------------------------------------------- 1 | #ifndef __SMOKE_H__ 2 | #define __SMOKE_H__ 3 | 4 | #include "sys.h" 5 | 6 | #define uint unsigned int 7 | #define uchar unsigned char 8 | #define Data_ADC0809 P1 9 | 10 | extern uchar k; 11 | 12 | uchar ADC0809(); 13 | void delay(uint t); 14 | void exter0() interrupt 1 ; 15 | 16 | 17 | #endif --------------------------------------------------------------------------------