資源簡介
人臉識別門禁系統
代碼片段和文件信息
#include???
#define?GPIO_MOTOR?P1
sbit?LED?=?P2^0;??
unsigned?char?UART_buff;??
unsigned?int?g_t?=?0;
unsigned?int?g_flag?=?0;
unsigned?char?code?FFW[8]={0xf10xf30xf20xf60xf40xfc0xf80xf9};?//反轉順序
unsigned?char?code?FFZ[8]={0xf90xf80xfc0xf40xf60xf20xf30xf1};?//正轉順序
void?Delay1ms(unsigned?int?c);
void?Delay(unsigned?int?t);
void?LED_INIT();
void?UART_INIT();
void?Motor_Run(unsigned?char?mode);
?
void?main?(void){?
LED_INIT();
UART_INIT();
while(1){
???if(g_flag?==?1){
while(g_t++?!=?140){
??Motor_Run(1);
}
g_t=0;
Delay1ms(1200);?
while(g_t++?!=?140){
??Motor_Run(0);
}
g_t?=?0;
g_flag?=?0;
???}
???if(g_flag?==?2){
while(g_t++?!=?5){
LED?=?0;
Delay1ms(400);
LED?=?
- 上一篇:天氣預報app源碼
- 下一篇:java web ssh 網上訂餐系統源碼
評論
共有 條評論