Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
gyroscope_sensor_and_how_to_use_it [04-11-2016 14:49]
185.48.102.187 created
gyroscope_sensor_and_how_to_use_it [04-11-2016 14:54]
185.48.102.187
Line 1: Line 1:
-===== The pressure ​sensor and how to use it =====+===== The gyroscope ​sensor and how to use it =====
 (updated 11 november 2016) (updated 11 november 2016)
 +
 With the gyroscope sensor in the Pillos you can control the rotations over the X, Y and Z axis of a game object by simply tilting/​rotating the Pillo. In order to retrieve the gyroscope values of a Pillo you need to use one of the [[api_overview|GetGyro]] functions and read it out from a variable. With the gyroscope sensor in the Pillos you can control the rotations over the X, Y and Z axis of a game object by simply tilting/​rotating the Pillo. In order to retrieve the gyroscope values of a Pillo you need to use one of the [[api_overview|GetGyro]] functions and read it out from a variable.
  
Line 38: Line 39:
                 print("​GyroY:​ + GyroY);                 print("​GyroY:​ + GyroY);
                 print("​GyroZ:​ + GyroZ);                 print("​GyroZ:​ + GyroZ);
 +                ​
 +                if(GyroZ > 0)
 +                {
 +                     //Do something here.
 +                }
  }  }
 } }