Class Index | File Index

Classes


Class BO.io.GyroITG3200


Extends BO.I2CBase.

Creates an interface to an ITG3200 3-axis gyroscope. This gyro measures angular acceleration around the x, y, and z axis. This object provides the angular velocity of each axis. Proper calibration is required for an accurate reading. See Breakout/examples/sensors/itg3200.html and Breakout/examples/processing_js/gyro.html for example applications.

Defined in: GyroITG3200.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
BO.io.GyroITG3200(board, autoStart, address)
InvenSense ITG3200 3-axis MEMS gyro
Field Summary
Field Attributes Field Name and Description
<static> <constant>  
BO.io.GyroITG3200.ID_AD0_VDD
ID = 0x69 if sensor pin 9 (AD0) is tied to Power, else ID = 0x68 if pin 9 is tied to Ground
 
[read-only] The state of continuous read mode.
 
The raw x axis output value from the sensor.
 
The raw y axis output value from the sensor.
 
The raw z axis output value from the sensor.
 
x
[read-only] The x axis output value in degrees.
 
y
[read-only] The y axis output value in degrees.
 
z
[read-only] The z axis output value in degrees.
Fields borrowed from class BO.I2CBase:
address, board
Method Summary
Method Attributes Method Name and Description
 
setGains(xGain, yGain, zGain)
Set the gain value for the x, y, or z output
 
setOffsets(xOffset, yOffset, zOffset)
Offset the x, y, or z output by the respective input value
 
setRevPolarity(xPol, yPol, zPol)
Set the polarity of the x, y, and z output values.
 
Start continuous reading of the sensor
 
Stop continuous reading of the sensor
 
Sends read request to accelerometer and updates accelerometer values.
Methods borrowed from class BO.I2CBase:
addEventListener, dispatchEvent, handleI2C, hasEventListener, removeEventListener, sendI2CRequest
Event Summary
Event Attributes Event Name and Description
 
The update event is dispatched when the accelerometer values are updated.
Class Detail
BO.io.GyroITG3200(board, autoStart, address)
InvenSense ITG3200 3-axis MEMS gyro
Parameters:
{IOBoard} board
The IOBoard instance
{Boolean} autoStart
True if read continuous mode should start automatically upon instantiation (default is true)
{Number} address
The i2c address of the accelerometer. If pin 9 (AD0) of the module is tied to VDD, then use GyroITG3200.ID_AD0_DVV (0x69), if pin 9 (AD0) is tied to GND, then use GyroITG3200.ID_AD0_GND. Default = GyroITG3200.ID_AD0_VDD
Field Detail
<static> <constant> BO.io.GyroITG3200.ID_AD0_VDD
ID = 0x69 if sensor pin 9 (AD0) is tied to Power, else ID = 0x68 if pin 9 is tied to Ground

{Boolean} isRunning
[read-only] The state of continuous read mode. True if continuous read mode is enabled, false if it is disabled.

{Number} rawX
The raw x axis output value from the sensor.

{Number} rawY
The raw y axis output value from the sensor.

{Number} rawZ
The raw z axis output value from the sensor.

{Number} x
[read-only] The x axis output value in degrees.

{Number} y
[read-only] The y axis output value in degrees.

{Number} z
[read-only] The z axis output value in degrees.
Method Detail
setGains(xGain, yGain, zGain)
Set the gain value for the x, y, or z output
Parameters:
{Number} xGain
{Number} yGain
{Number} zGain

setOffsets(xOffset, yOffset, zOffset)
Offset the x, y, or z output by the respective input value
Parameters:
{Number} xOffset
{Number} yOffset
{Number} zOffset

setRevPolarity(xPol, yPol, zPol)
Set the polarity of the x, y, and z output values.
Parameters:
{Boolean} xPol
Polarity of the x axis
{Boolean} yPol
Polarity of the y axis
{Boolean} zPol
Polarity of the z axis

startReading()
Start continuous reading of the sensor

stopReading()
Stop continuous reading of the sensor

update()
Sends read request to accelerometer and updates accelerometer values.
Event Detail
{BO.io.GyroEvent.UPDATE} update
The update event is dispatched when the accelerometer values are updated.
This event has the following properties:
{BO.io.GyroITG3200} target
A reference to the GyroITG3200 object.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 12 2012 23:27:53 GMT-0400 (EDT)