IMPLEMENTATION OF THE PROJECT
For running the project we need to go through some process. Process are given below.
Wiring the connection
MPU9255 STM32F4Z9I-DISCO Board
SCL ----------------------------- PB10
SDA ---------------------------- PB11
INTA --------------------------- PB1
VCC --------------------------- 5V
GND --------------------------- GND
USB TO TTL BOARD STM32F4Z9I-DISCO Board
TX ----------------------------------------------- PA9
RX ---------------------------------------------- PA10
Setup the CoCox IDE.I prefer to download the version of 1.7.8. In the newer version, there have some library and feature missing which is required for the project.
Open the Project
Change the configuration according to below picture
Rebuild all. Hopefully, there should not have any error
Connect the hardware and download the hex file to the hardware
Python Client
A Python client is included with the release package to test the performance and display log information. The client can be found in the release package under the directory (..\eMPL-pythonclient). The python client also accepts user input and provides the input the sample HAL Application. The user would be able to enable/disable sensors, enable computation algorithms, enable hardware features, and view log information. You would need to install Python (version 2.5 and above), pyserial and pygame for the python script to execute.
Installing Python 2.7 (32-bits version) or above, pyserial, and pygame
Python: https://www.python.org/downloads/
Pyserial: https://pypi.python.org/pypi/pyserial
Connect your flashed and working hardware to your PC and find the COM port in the device manager if the connected device. You should find out the no of COM port.
Installing Python 2.7 (32-bits version) or above, pyserial, and pygame
python eMPL-client.py <COM PORT NUMBER>
Ex: python eMPL-client.py COM3
2 Windows will pop one. 1 contains a 3D Cube which corresponds with the quaternion angles outputted from the device. The other window will display any related logs or data.
Motion Driver can accept input commands and display various different data. You must first make sure the cube window is the focused window then type in the input command.
-
‘8’ : Toggles Accel Sensor
-
‘9’ : Toggles Gyro Sensor
-
‘0’ : Toggles Compass Sensor
-
‘a’ :Prints Accel Data
-
‘g’ : Prints Gyro Data
-
‘c’ : Prints Compass Data
-
‘e’ : Prints Eular Data in radius
-
‘q’ : Prints Quaternions
-
‘h’ : Prints Heading Data in degrees
-
‘i’ : Prints Linear Acceleration data
-
‘o’ : Prints Gravity Vector data
-
‘w’ : Get compass accuracy and status
-
‘d’ : Register Dump
-
‘p’ : Turn on Low Power Accel Mode at 20Hz sampling
-
‘l’ : Load calibration data from flash memory
-
‘s’ : Save calibration data to flash memory
-
‘t’ : run factory self test and calibration routine
-
‘1’ : Change sensor output data rate to 10Hz
-
‘r’ : Prints Rotational Matrix Data
-
‘2’ : Change sensor output data rate to 20Hz
-
‘3’ : Change sensor output data rate to 40Hz
-
‘4’ : Change sensor output data rate to 50Hz
-
‘5’ : Change sensor output data rate to 100Hz
-
‘,’ : set interrupts to DMP gestures only
-
‘.’ : set interrupts to DMP data ready
-
‘6’ : Print Pedometer data
-
‘7’ : Reset Pedometer data
-
‘f’ : Toggle DMP on/off
-
‘m’ : Enter Low Power Interrupt Mode
-
‘v’ : Toggle DMP Low Power Quaternion Generation
-
‘x’ : Reset the MSP430