Python driver test

Test under windows

Take win7, a9, python2.7 as examples, test hif_a9.py and hif_a9_ui.py

  1. Plug in the USB device of the IMU, and check whether the computer can recognize the Silicon Labs CP210x USB to UART Bridge (COM*)* refers to any number. If there are multiple Silicon Labs CP210x USB to UART Bridge (COM*), please unplug the USB of the IMU again, and note the number of COM ports that the IMU recognizes by the computer.

  2. Enter the script directory and modify COM3 in the corresponding python script (the default COM3 used by the script) is the number recognized by your computer.

  3. win+R opens a window titled run, enter cmd in the input box, and the command character interface that appears after pressing Enter (you can see an error after running through this character interface at the beginning, which is convenient for installation according to the error prompt missing dependencies or why the troubleshooting didn't run successfully). Use the cd command to go to the directory where the script is located, and then use the python command to run the script file. The following picture is a screenshot of the hfi_a9.py driver after the successful operation. After the successful operation, the following information will be continuously printed under normal circumstances.

  4. Similarly, the screenshot of hfi_a9_ui.py after running successfully. The window titled handsfree imu, the data in it will be printed out.

Test under linux

Take ubuntu16.04, a9, python2.7 as examples, test hif_a9.py and hif_a9_ui.py

  1. Do not insert the USB of the IMU first, enter ls /dev/ttyUSB* in the terminal to check, then insert the USB into the computer, and then enter ls /dev/ttyUSB* in the terminal to check, the extra The ttyUSB device is the serial port of the IMU.

  2. Enter the script directory and modify /dev/ttyUSB0 in the corresponding python script (the script uses /dev/ttyUSB0 by default) for the number recognized by your computer

  3. You can use the cd command to go to the directory where the script is located, or you can open a terminal in the directory where the script is located, and then use the python command to run the script. The following figure is a screenshot after the hfi_a9.py driver runs successfully.

  4. Similarly, the screenshot of hfi_a9_ui.py after running successfully. The window titled handsfree imu, the data in it will be printed out.

results matching ""

    No results matching ""