Gyroscopes are devices that sense angular velocity. Angular velocity is the change in rotational angle per unit of time. Thus gyroscopes can sense rotational motion and change in orientation of an object.
Download the Gyroscope.zip file. Extract it into Documents-> Arduino-> libraries folder.
Now open Arduino IDE. Go to Files-> Examples-> Gyroscope and open Gyroscope_example code in IDE.
Now connect MYOSA motherboard to your computer. Go to Tools-> Board-> and choose Arduino/Genuino Mega or Mega 2560
Go to Tools-> port and choose COM on which board is connected.
Now upload your code to MYOSA motherboard by clicking upload button from toolbar.
open the Serial Monitor from Tools-> Serial Monitor
Now you can see the Angle values on Serial Monitor.
To initialize the gyroscope sensor:
g.begin();
Get values of angle with refrence to x,y and z directions.Angle is measured in degree unit.
int16_t Gx = g.getX(); //Rotation around X axis
int16_t Gy = g.getY(); //Rotation around Y axis
int16_t Gz = g.getZ(); //Rotation around Z axis