UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

Itg3200 Class

Module: itg3200

InvenSense* ITG-3200 is a 3-axis digital gyroscope. ( https://www.sparkfun.com/datasheets/Sensors/Gyro/PS-ITG-3200-00-01.4.pdf ) This sensor has been tested and can run at either 3.3V or 5V on Intel(R) Galileo.
However , it is incompatible with and not detected on the I2C bus by Intel(R) Edison using the Arduino* breakout board.
itg3200.jpeg

Methods

Itg3200

(
  • bus
)
Number

Creates an Itg3200 object

Parameters:

  • bus Number

    Number of the used I2C bus

Returns:

Number:

calibrate

()

Calibrates the sensor to 0 on all axes. The sensor needs to be resting for accurate calibration. It takes about 3 seconds and is also called by the constructor on object creation.

getTemperature

() Number

Returns the temperature reading, in Celsius, from the integrated temperature sensor

Returns:

Number:

float Temperature in Celsius

getRotation

() Float *

Returns a pointer to a float[3] that contains computed rotational speeds (angular velocities)

Returns:

Float *:

float* to a float[3]

getRawValues

() Int16_t *

Returns a pointer to an int[3] that contains raw register values for X, Y, and Z

Returns:

Int16_t *:

int* to an int[3]

getRawTemp

() Number

Returns an int that contains the raw register value for the temperature

Returns:

Number:

int Raw temperature

update

() Mraa::Result

Updates the rotational values and temperature by reading from the I2C bus

Returns:

Mraa::Result:

0 if successful