259 [Complete Course Design] Design of Parking Space Guidance System Based on 51 Single Chip Microcomputer-Infrared Pair Tube-Bluetooth

[Resource Download] The download address is as follows:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

51 parking lot guidance system design-infrared pair tube-LCD1602-LED-Bluetooth

This design is composed of STC89C52 single-chip circuit + infrared pair tube sensor + LCD1602 liquid crystal display circuit + Bluetooth module circuit + LED indicator circuit + power supply circuit.

1. Detect whether parking spaces are occupied in real time through the infrared pair tube module. The parking spaces are divided into 1 parking space, 2 parking spaces, and 3 parking spaces. If the parking space is occupied, the system sends the occupancy information to the mobile phone APP through the Bluetooth module, such as: NO1 Parking, NO2 Parking, NO3 Parking, NO1 void, NO2 void, NO3 void.

2. The LCD displays the number of occupied and empty parking spaces in real time. And upload the number of occupied parking spaces and the number of empty parking spaces to the mobile APP in real time.

3. The 3 yellow lights can be turned on and off through the mobile APP.

sbit led01 = P1^3;
sbit led02 = P1^4;
sbit led03 = P1^5;

unsigned char xdata dis0[16];//定义显示区域临时存储数组
unsigned char xdata dis1[16];

unsigned char disFlag= 0;//显示标志
unsigned char i,j;

unsigned long time_20ms=0;		   //定时器计数

unsigned char firstin =0;			  //首次接收到标志
unsigned char tab[20];				  //串口数据暂存
unsigned char Count=0;				  //串口接收计数
unsigned char  uartbusy =0;			  //串口判忙

bit reportFlag =0 ;			//上报标志
unsigned char weiFlag01 = 0; //位置标志
unsigned char weiFlag02 = 0; //位置标志
unsigned char weiFlag03 = 0; //位置标志
unsigned char ZYNum = 0; //占用总数
void Init_Timer0(void);		 //函数声明
void uartSendStr(unsigned char *s,unsigned char length);
void UART_Init(void);
void uartSendByte(unsigned char dat);

void main(void)

 

Guess you like

Origin blog.csdn.net/theroadon/article/details/109261240