The accelerometer, compass, and gyroscope
In the following example, we will try out an accelerometer, which is a device used for sensing g-force. The accelerometer can sense movement in different directions. Normally, there are two types of accelerometer: the 2 axes and 3 axes. The 2 axes measures in two directions, left to right and front to back, and these directions are often named as the x axis and y axis. The 3 axes accelerometer also measures in a z axis, which is up and down. The accelerometer measures movement relative to its own position, which means that when you move it, it measures the g-force in the direction you are moving it.
The sensor used in this example is the FLORA accelerometer/compass/gyroscope, which is actually three sensors in one. Besides the accelerometer, it holds a compass, known as a magnetometer, which senses where the strongest magnetic field is coming from. If there are no other magnets near by, the strongest magnetic field comes from the Earth's north...