Somatosensory application based on Android mobile device sensor

    In order to realize the somatosensory operation by using the mature sensor technology of Android mobile device, the somatosensory application system based on Android mobile device sensor is designed. The architecture of the system is versatile and not limited to programs that can be fixed in a PC. The system includes a mobile terminal (Android) program and a middleware platform under the Windows platform. The Android platform device is used as an input device, and data is collected by various sensors, and sent to the middleware platform of the PC through WIFI, after receiving. Customizable to the corresponding operating instructions to control different applications or games in the computer.

    1, the overall design of the system

    The system adopts the client/server (C/S) architecture, and uses the PC or the computing device with strong running capacity as the server to communicate with the Android mobile phone and issue command operations. Android mobile phone as a client, through a friendly user interface, guide users to select the appropriate sensor type (currently including multiple sensors in the smart phone), such as setting the type of user operation is dynamic (acceleration application) or competitive (support Application of force).

    1.1, communication between the server and the Android phone

    The main problems that need to be solved between the communication between the server and the Android mobile phone are: the stability and efficiency of data transmission, the identification method of the user operation mode and the user's action quantization method.

    1.1.1, data transmission

    In the system, the server and the client use Socket to communicate through the User Datagram (UDP) protocol, and the transmission speed is fast and there is no delay. Although the UDP protocol has the problem that datagrams are easily lost and cannot guarantee that each datagram is transmitted accurately, the data generated by the user's actions is continuous for the operation of the motion sense, even if some of the datagrams are lost, the user experience is also lost. Nothing serious. For example, to control the car to turn left, the user action must have a range, in this range, in fact, has sent a lot of left-left datagrams, losing one or two datagrams has little effect on the user experience.

    There are two datagram classes in Java: DatagramSocket (class for end-to-end communication) and DatagramPacket (datagram class for communication data). Clients A and B in the program can send and receive DatagramPackets by calling DatagramSocket, as shown in Figure 1. Shown.

    Somatosensory application based on Android mobile device sensor

    Figure 1 UDP communication mode

    1.1.2, user operation pattern recognition

    On the basis of determining the mobile communication transmission protocol, the multi-touch function and the sensor function of the mobile device need to be integrated into the powerful computing function of the server, that is, the integration of the information space and the physical space is realized, so the instruction issued by the mobile device needs to be changed. An operation that the server can recognize.

    The premise of identification is that the user needs to guide the mode of operation, such as using a touch screen or a sensor, and the Android sensor includes various sensors such as illumination, temperature, acceleration, pressure, gravity, geomagnetism, etc., so when the state mode of the Android mobile body sense is changed, The PC client should be notified for identification so that the correct operation mapping can be performed.

    The message format sent by the notification status change in the system is: state+n. Where state is a fixed string and n is a contracted number. The state change class StateChangedInformer inherits the base class Transmission and sends a status message to the PC.

    Commonly used user operations belong to different modes of application, such as the handle mode belongs to the multi-touch screen mode application, while the slide (PPT), racing, etc. control applications belonging to the sensor mode.

    1.1.3, motion data quantification

    The user needs to implement double-clicking, long-pressing, and arcing on the screen (circle style as shown on the left side of Figure 2). These user operations must be quantized into digital signals to be processed. The button of the handle has two states of pressing and popping, defining the corresponding number of the number and the keyboard, encapsulating the sending method thereof, and realizing the remote control function on the basis of the existing data transmission.

    Somatosensory application based on Android mobile device sensor

    Figure 2 user interface

    51V Battery pack

    51V Battery Pack,Portable Battery Box,Portable Battery Bank,Ac Battery Pack

    Zhejiang Casnovo Materials Co., Ltd. , https://www.casnovo-new-energy.com

    Previous Post: BAT who will summit 2017 artificial intelligence throne?
    Next Post: Beijing Law Association to File Class Action against Xiaolan Bicycle: Currently recruiting victims
    Home
    Recent Posts
    • A fixed ratio high voltage high power switched c…
    • How to implement LED lantern control with Dragon…
    • Coal chemical investment accelerates or welcomes…
    • What kind of microphone is the moving coil, capa…
    • Industrial Internet from the perspective of smar…
    • Let the product be full of human care, Foxconn w…
    • I understand the difference between scala and ja…
    • Create a smart life science and technology life …
    • TDK high voltage DC contactor has a freewheeling…
    • Introduction to PLC programming
    • Design scheme based on industrial control platfo…
    • Details timer and timer interrupts
    • AIoT ecosystem embarks on cloud resource sharing…
    • Analysis of the development trend and current si…
    • How does mcgs make buttons in the picture?
    • Summarize the concentration of ARM abort and giv…
    • Apple's “Unmanned Autonomous Navigation Sy…
    • Is the new energy vehicle safe? Tesla Global Rec…
    • Power sequencing is too important! What are the …
    • Plode measurement and control announced transfor…