•Using esp32 as the main control chip to realize the basic logic function of punch card system.
•Using RFID unit to realize the information identification and reading function of IC card
•Realize the "offline cloud platform" interaction function of operation information based on mqtt information transmission technology
•Using M5StickV to realize QR code recognition technologyM5StickV
To set the M5StickV identification QR Code:
Use the sensor and image library provided by Microsoft to set the camera lens and image parameters respectively. LCD library is the parameter of control screen display. Our lens parameters are set as follows: the color format of the image is rgb565. Set image pixel size, sensor.QQVGA : 160x120.Set img to capture the image of the camera.
Find using img Library_ QRcode is to check whether there is QRcode on the graph. If there is, a series of parameters of QRcode will be returned, such as the parsed data, specifications, etc.
Because we mainly use the decoded code, we take the decoding result separately for the next step.RFID
The structure of RFID card includes uid and blocks. UID is the unique identifier of each card, which is only readable and not writable. Blocks are readable and writable, so we put students' data in blocks. It is worth noting that the time delay should be added, otherwise, if the operation can be accumulated, it will be identified many times due to the high frequency of RF processing identification.UART
Universal asynchronous receiver / transmitter (UART) is a kind of serial asynchronous transceiver protocol, which is widely used. The principle of UART is to transmit data bit by bit. The high level of the status bit on the signal line of UART communication protocol represents' 1 'and the low level represents' 0'. Of course, when the UART serial port is used for communication between the two devices, the transmission rate and some data bits must be agreed first. The hardware must be connected before transmission, and the connection mode is as shown in the figure.
First, we analyze the interface of the devices we use. We can find the devices we use from the hardware design drawing. The TX and Rx interfaces of m5go Lite are GPIO17 and GPIO16, while we map the ports of GPIO35 and GPIO34 of M5StickV to RX and TX to connect the TX and Rx of M5GO and M5StickV, and Rx and TX are connected. Use the method to call the UART library with micropython and set the corresponding platform.
•M5GO Lite UI interface
•M5GO Lite realizes WiFi connection function
•RFID reading and writing IC card information
•Mqtt network protocol communication realizes information interaction between cloud platform and development board
•M5StickV identification and reading QR code information
•Punch card system and its information query and display functionsSecondary function realization
•Odd day non repeatable clock in, no matter how
•Scan the QR code of non student information, do not upload
•Temporary data storage list in case of upload failure