Parking lot car search system (recognition of license plate, mobile app to query relevant information)

Parking Locating System

Parking Locating System

foreword

Last week, I spent about a week working on a car-finding system project in the parking lot, which can recognize the license plate and query vehicle information through the mobile app
insert image description here
insert image description here

1. Mobile app

The mobile app still uses the lighting technology. Through the Internet of Things access, this time I have a deeper understanding of the components of the blinker, and added a query function to the garage.
insert image description here
insert image description here
insert image description here
ESP8266 code:

#define BLINKER_WIFI
#include <SoftwareSerial.h>
#include <Blinker.h>

char auth[] = "**************"; // blinker app提供的秘钥
char ssid[] = "Mr.Robot";// wifi 名字
char pswd[] = "************";// wifi 密码
int incomedate=0;
// 新建组件对象
BlinkerButton Button1("btn-abc");
BlinkerNumber Number1("num-abc");
BlinkerNumber TEMP("tem");
#define TEXTE_2 "tex-pi2"
BlinkerText Text2(TEXTE_2);
int counter = 0;
int a=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0;
void dataRead(const String & data){
    
      
  
     uint32_t BlinkerTime = millis();
 
     BLINKER_LOG("input=",data);
    if(data=="苏E·82L84")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a);
       Text2.print(data);
    }
    if(data=="桂A·R397")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a1);
       Text2.print(data);
    }
     if(data=="鲁F·8L620")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a2);
       Text2.print(data);
    }
        if(data=="湘A·BA597")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a3);
       Text2.print(data);
    }
       if(data=="蒙E·PF927")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a4);
       Text2.print(data);
    }

       if(data=="川B·029PQ")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a5);
       Text2.print(data);
    }

      if(data=="京K·98410")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a6);
       Text2.print(data);
    }

          if(data=="陕K·7555")
    {
    
    
     Serial.println("查询成功");
      TEMP.print(a7);
       Text2.print(data);
    }
  if (Serial.available() > 0)//串口接收到数据
  {
    
    
    incomedate = Serial.read();//获取串口接收到的数据
    if (incomedate == 'H')
    {
    
    
       a=1;
    }
    if (incomedate == 'Q')
    {
    
    
       a=2;
    }
    if (incomedate == 'W')
    {
    
    
       a=3;
    }
    if (incomedate == 'E')
    {
    
    
       a=4;
    }
    if (incomedate == 'R')
    {
    
    
       a=5;
    }
    if (incomedate == 'T')
    {
    
    
       a=6;
    }
    if (incomedate == 'Y')
    {
    
    
       a=7;
    }
    if (incomedate == 'U')
    {
    
    
       a=8;
    }
    if (incomedate == 'I')
    {
    
    
       a1=1;
    }
    if (incomedate == 'O')
    {
    
    
       a1=2;
    }
    if (incomedate == 'P')
    {
    
    
       a1=3;
    }
    if (incomedate == 'A')
    {
    
    
       a1=4;
    }
    if (incomedate == 'S')
    {
    
    
       a1=5;
    }
    if (incomedate == 'D')
    {
    
    
       a1=6;
    }
    if (incomedate == 'F')
    {
    
    
       a1=7;
    }
    if (incomedate == 'G')
    {
    
    
       a1=8;
    }
     if (incomedate == 'J')
    {
    
    
       a2=1;
    }
    if (incomedate == 'K')
    {
    
    
       a2=2;
    }
    if (incomedate == 'L')
    {
    
    
       a2=3;
    }
    if (incomedate == 'Z')
    {
    
    
       a2=4;
    }
    if (incomedate == 'X')
    {
    
    
       a2=5;
    }
    if (incomedate == 'C')
    {
    
    
       a2=6;
    }
    if (incomedate == 'V')
    {
    
    
       a2=7;
    }
    if (incomedate == 'B')
    {
    
    
       a2=8;
    }
        if (incomedate == 'N')
    {
    
    
       a3=1;
    }
    if (incomedate == 'M')
    {
    
    
       a3=2;
    }
    if (incomedate == '1')
    {
    
    
       a3=3;
    }
    if (incomedate == '2')
    {
    
    
       a3=4;
    }
    if (incomedate == '3')
    {
    
    
       a3=5;
    }
    if (incomedate == '4')
    {
    
    
       a3=6;
    }
    if (incomedate == '5')
    {
    
    
       a3=7;
    }
    if (incomedate == '6')
    {
    
    
       a3=8;
    }
       if (incomedate == '7')
    {
    
    
       a4=1;
    }
    if (incomedate == '8')
    {
    
    
       a4=2;
    }
    if (incomedate == '9')
    {
    
    
 
       a4=3;
    }
    
    if (incomedate == '`')
    {
    
    
  
       a4=4;
    }
    
    if (incomedate == '!')
    {
    
    
       a4=5;
    }
    if (incomedate == '@')
    {
    
    
       a4=6;
    }
    if (incomedate == '#')
    {
    
    
       a4=7;
    }
    if (incomedate == '$')
    {
    
    
       a4=8;
    }
     if (incomedate == '%')
    {
    
    
       a5=1;
    }
    if (incomedate == '^')
    {
    
    
       a5=2;
    }
    if (incomedate == '&')
    {
    
    
       a5=3;
    }
    if (incomedate == '*')
    {
    
    
       a5=4;
    }
    if (incomedate == '(')
    {
    
    
       a5=5;
    }
    if (incomedate == ')')
    {
    
    
       a5=6;
    }
    if (incomedate == '_')
    {
    
    
       a5=7;
    }
    if (incomedate == '+')
    {
    
    
       a5=8;
    }
        if (incomedate == '}')
    {
    
    
       a6=1;
    }
    if (incomedate == '{')
    {
    
    
       a6=2;
    }
    if (incomedate == ']')
    {
    
    
       a6=3;
    }
    if (incomedate == '[')
    {
    
    
       a6=4;
    }
    if (incomedate == '=')
    {
    
    
       a6=5;
    }
    if (incomedate == '|')
    {
    
    
       a6=6;
    }
    if (incomedate == ';')
    {
    
    
       a6=7;
    }
    if (incomedate == '<')
    {
    
    
       a6=8;
    }
     if (incomedate == '>')
    {
    
    
       a7=1;
    }
    if (incomedate ==',')
    {
    
    
       a7=2;
    }
    if (incomedate == '.')
    {
    
    
       a7=3;
    }
    if (incomedate == '?')
    {
    
    
       a7=4;
    }
    if (incomedate == '*')
    {
    
    
       a7=5;
    }
    if (incomedate == '~')
    {
    
    
       a7=6;
    }
    if (incomedate == ':')
    {
    
    
       a7=7;
    }
    if(incomedate == '-')
    {
    
    
       a7=8;
    }
 }
}

void setup()
{
    
    
    // 初始化串口
    Serial.begin(115200);
    BLINKER_DEBUG.stream(Serial);
    BLINKER_DEBUG.debugAll();
    Blinker.begin(auth, ssid, pswd);
    Blinker.attachData(dataRead);
}

void loop()
{
    
    
    Blinker.run();
}

2. License plate recognition

The license plate is recognized by yolov2+K210, and the serial port communication sends the information to STM32.
insert image description here

insert image description here

3. Data query

Recognize the license plate through K210, send it to STM32, store the information in an array through infrared sensing, and then send it to ESP8266.

Summarize

In fact, the difficulty of this project lies in the recognition of the license plate and the matching of data. The license plate recognition uses the YOLOV2 algorithm and the development board K210 of deep learning, which makes the processing faster and more accurate. Data matching adopts the method of simulating the database for matching. In the process of data matching, pay attention to "c1" and cThe two ways of '1' are completely different. Only one quotation mark can be called a match, and two quotation marks are for address.

Guess you like

Origin blog.csdn.net/qq_51963216/article/details/124716881