If it is placed at a certain angle, it will detect that the force of 1 g distributes on different axis. If it is placed vertically, it will detect the force exerting on it along Y-axis is about 1 g. If the module is still and completely motionless, the force that the earth gravity exerts on it is about 1 g. The accelerometer can be used to measure the gravity g. The 3-axis accelerometer means it can detect the motion or gravity of a an object in 3D space. By perceiving the total inertial force in a specific direction, the accelerometer can measure the acceleration and gravity. The 3-axis accelerometer can measure the change of acceleration in X, Y, and Z axes. The Me 3-Axis Accelerometer and Gyro Sensor integrates a 3-axis accelerometer, a 3-axis angular velocity sensor (gyro), and a Digital Motion Processing engine (DMP), and outputs integrated 9-axis synthetical data to application client in the form of single data stream from the I2C port. The following is the effect to make the panda speaking out the value of X/Y/Z of Me 3-Axis Accelerometer and Gyro Sensor. Me 3-Axis Accelerometer and Gyro Sensor supports the mBlock programming environment and its instructions are introduced as follows:
#GYROSCOPE SENSOR SERIAL#
We can see the value of X, Y, and Z on the serial monitor. When any value is input through the serial monitor, the module receives it and returns the current value of X, Y, and Z, so that we can identify the posture of current module. If you use Arduino to write a program, the library Makeblock-Library-master should be invoked to control the Me 3-Axis Accelerometer and Gyro Sensor. This is a routine wrote in Arduino. When the Dupont wire is used to connect the module to the Arduino UNO Baseboard, its SCL and SDA pins should be connected to I2C port, that is, the port A5 and A4 respectively as follows: Taking Makeblock Orion as example, you can connect it to ports No. Since the port of Me 3-Axis Accelermeter and Gyro Sensor has white ID, you need to connect the port with white ID on Makeblock Orion when using RJ25 port. The port of Me 3-Axis Accelermeter and Gyro Sensor has 4 pins, and their functions are as follows: