|
| 1 | +# In-air Handwritten Characters Recognition |
| 2 | +This application is a concrete example of deploying a **neural network** on a wearable device. This application can **recognize air-handwritten characters** through wearable devices and display them on the wearable terminal. In addition, the recognition result can be transmitted to another terminal via **WIFI**, and people can perform simple text editing on this terminal through **gesture control**. And it can also broadcast voice, record temperature and time data, etc. This application can help researchers record data while doing experiments without the need to hold a pen or keyboard to input with gloves. |
| 3 | + |
| 4 | +- [Introduction](#Introduction) |
| 5 | + - [Function](#Function) |
| 6 | + - [System Architecture](#System-Architecture) |
| 7 | + - [Hardware Architecture](#Hardware-Architecture) |
| 8 | + - [Software Flow](#Software-Flow) |
| 9 | + - [Neural network structure](#Neural-network-structure) |
| 10 | + - [UI](#UI) |
| 11 | +- [Hardware and Software Setup](#Hardware-and-Software-Setup) |
| 12 | + - [Required Hardware](#Required-Hardware) |
| 13 | + - [Required Software](#Required-Software) |
| 14 | + - [Hardware Connection](#Hardware-Connection) |
| 15 | +- [User Manual](#User-Manual) |
| 16 | + - [Before Running This Application](#Before-Running-This-Application) |
| 17 | + - [Run This Application](#Run-This-Application) |
| 18 | + - [Makefile](#Makefile) |
| 19 | + |
| 20 | +## Introduction |
| 21 | +**In-air Handwritten characters Recognition** |
| 22 | + |
| 23 | +### Function |
| 24 | +**1.Sending terminal** |
| 25 | +- **In-air handwritten characters recognition**. At present, the in-air handwritten characters that it can recognize through the neural network are numbers 0-9 and capital letters A-Z. When the button is pressed, the air handwritten characters will be recognized, and when the button is released, the characters will not be recognized |
| 26 | +- **Oled real-time display**. Oled displays the recognized in-air handwritten characters in real time |
| 27 | +- **Wifi transmission**. Transmit the recognized in-air handwrittencharacters to the receiving terminal via wifi |
| 28 | + |
| 29 | +**2.Receiving terminal** |
| 30 | +- **Wifi transmission**. Receive recognized in-air handwritten characters from the sending terminal |
| 31 | +- **Serial screen display**. Serial screen records in-air handwritten characters, current ambient temperature data and real-time clock information |
| 32 | +- **Voice broadcast**. The received air handwritten characters are read out by the voice module |
| 33 | +- **Gesture Recognition**. The infrared gesture recognition module can perform the operations of "previous line", "next line", "clear a character", "clear the entire line", "copy this line" and "paste this line" on the characters displayed on the serial screen. The detailed control commands are as followed: |
| 34 | + |
| 35 | +| Command | Gesture | |
| 36 | +| ---------------------- | -------------- | |
| 37 | +| previous row | up | |
| 38 | +| Next line | down | |
| 39 | +| Clear a character | left | |
| 40 | +| Clear the entire line | right | |
| 41 | +| Copy this line | forward | |
| 42 | +| Paste this line | backward | |
| 43 | +### System Architecture |
| 44 | +#### Hardware Architecture |
| 45 | + |
| 46 | +#### Software Flow |
| 47 | + |
| 48 | +#### Neural network structure |
| 49 | + |
| 50 | +### UI |
| 51 | + |
| 52 | + |
| 53 | +## Hardware and Software Setup |
| 54 | +### Required Hardware |
| 55 | + |
| 56 | +- 2 ARC IoT Development Kit(IoTDK) |
| 57 | +- 2 NRF24L01 Wireless communication module |
| 58 | +- 1 MPU9250(IoTDK include it) |
| 59 | +- 1 Button |
| 60 | +- 1 OLED module |
| 61 | +- 1 PAJ7620U2 gesture sensor |
| 62 | +- 1 DGUS serial screen |
| 63 | +- 1 I2C to UART module |
| 64 | +- 1 Power converter module for the serial screen |
| 65 | +- 1 SYN6288 speech synthesis module |
| 66 | +- 1 DHT11 temperature and relative humidity sensor |
| 67 | +- 1 DS1302 real-time clock module |
| 68 | +- 2 Micro SD Card for IoTDK second bootloader |
| 69 | +- 1 Micro SD Card for the initialization of the serial screen |
| 70 | + |
| 71 | +### Required Software |
| 72 | +- [embARC Open Software Platform(OSP)](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp) |
| 73 | +- [embARC Machine Learning Inference Library (MLI)](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp/tree/embarc_mli) |
| 74 | +- ARC GNU Tool Chain |
| 75 | +- Serial port terminal, such as putty, tera-term or minicom |
| 76 | +- [DGUS_V3788](http://www.dwin.com.cn/home/Index/download_file?download_id=1753) for serial screen UI development |
| 77 | + |
| 78 | +### Hardware Connection |
| 79 | +1. IoTDK1——Sending terminal |
| 80 | + |
| 81 | + | Device | Bus | Connector | Description | |
| 82 | +| ------------------ | ------ | ------------ | ---------------------------------------------- | |
| 83 | +| Button| | GPIO_4B1(2) | Control the operation of the neural network | |
| 84 | +| OLED | I2C0 | |Display characters| |
| 85 | +| NFR2101 | | GPIO_8B10[0:5] | wifi transmission | |
| 86 | +| MPU9250 | I2C_0 || In_air handwritten character data reading | |
| 87 | +2. IoTDK2——Receiving terminal |
| 88 | + |
| 89 | + | Device | Bus | Connector | Description | |
| 90 | +| ------------------ | ------ | ------------ | ---------------------------------------------- | |
| 91 | +| SYN6288 | UART1 | | Speech synthesis | |
| 92 | +| DHT11 | | GPIO_4B1(3) | Read temperature data| |
| 93 | +| DS1302 | | GPIO_4B1[0:2] |Read time data| |
| 94 | +|DGUS | I2C0 | | Serial screen | |
| 95 | +|NFR2101| | GPIO_8B10[0:5] | wifi transmission | |
| 96 | +|PAJ7620| I2C0 | | Gesture Recognition | |
| 97 | + |
| 98 | +## User Manual |
| 99 | +### Before Running This Application |
| 100 | +- download source code of **In-air Handwritten Characters Recognition** |
| 101 | + |
| 102 | +- Initialize Smart Screen UI Copy the whole directory /DGUS_Project/DWIN_SET to an empty Micro SD card, and then insert it to the slot on the smart screen. Power up the screen and complete the initialization, then pull out the Micro SD card and reboot the screen. the UI project file can be modified with DGUS_V7388 IDE. |
| 103 | +- Make sure all connection is correct again. |
| 104 | +### Run This Application |
| 105 | +Here take IoTDK, CUR_CORE = arcem9d with ARC GNU Toolchain 2020.09 for example to show how to run this application. |
| 106 | +1. To build this applicaiton, use this command `make` |
| 107 | +2. To run this applicaiton, use this command `make run` |
| 108 | +3. Open your serial terminal such as Putty on PC, and configure it to right COM port and 115200bps. |
| 109 | +4. Wear the sending terminal on the palm of your hand, press the button and write in the air, release the button to see the recognition result of the air handwritten characters. |
| 110 | +#### Makefile |
| 111 | + |
| 112 | +- Selected embarc_mli here, then you can use [embarc_mli API][4] in your application: |
| 113 | + |
| 114 | + # Library |
| 115 | + LIB_SEL = embarc_mli |
| 116 | + |
| 117 | +- Target options about EMSK and toolchain: |
| 118 | + |
| 119 | + BOARD ?= iotdk |
| 120 | + BD_VER ?= 10 |
| 121 | + CUR_CORE ?= arcem9d |
| 122 | + TOOLCHAIN ?= gnu |
| 123 | + |
| 124 | +- The relative series of the root directory, here the path of the Makefile is `./embarc_osp-embarc_mli/embarc_applications/XDU_In-air_handwritten_characters_recognition/src/In-air_handwritten_characters_recognition_tx/makefile`: |
| 125 | + |
| 126 | + # |
| 127 | + # root dir of embARC |
| 128 | + # |
| 129 | + EMBARC_ROOT = ../../../.. |
| 130 | +- The relative series of the root directory, here the path of the Makefile is `./embarc_osp/embarc_applications/XDU_In-air_handwritten_characters_recognition/src/In-air_handwritten_characters_recognition_rx/makefile`: |
| 131 | + |
| 132 | + # |
| 133 | + # root dir of embARC |
| 134 | + # |
| 135 | + EMBARC_ROOT = ../../../.. |
| 136 | + |
| 137 | +- The middleware used in your application: |
| 138 | + |
| 139 | + MID_SEL = common |
| 140 | +- Directories of source files and header files: |
| 141 | + |
| 142 | + # application source dirs |
| 143 | + APPL_CSRC_DIR = . |
| 144 | + APPL_ASMSRC_DIR = . |
| 145 | + |
| 146 | + # application include dirs |
| 147 | + APPL_INC_DIR = . |
| 148 | + |
| 149 | + # application defines |
| 150 | + APPL_DEFINES = |
| 151 | + |
| 152 | + # include current project makefile |
| 153 | + COMMON_COMPILE_PREREQUISITES += makefile |
| 154 | + |
| 155 | + ### Options above must be added before include options.mk ### |
| 156 | + # include key embARC build system makefile |
| 157 | + override EMBARC_ROOT := $(strip $(subst \,/,$(EMBARC_ROOT))) |
| 158 | + include $(EMBARC_ROOT)/options/options.mk |
0 commit comments