pyupm_adxrs610 module

class pyupm_adxrs610.ADXRS610(dPin, tPin, aref=5.0)[source]

Bases: object

DFRobot ADXRS610 Gyro Breakout board.

ID: adxrs610

Name: Gyro Breakout Board (300 Degrees/second)

Other Names: ADXRS610

Category: compass

Manufacturer: dfrobot

Link:http://www.dfrobot.com/index.php?route=product/product&product_id=642

Connection: analog The ADXRS610 is a MEMS based single axis gyroscope with a range of +/- 300 degrees/sec. It also incorporates a temperature sensing unit that can be used for advanced calibration.

This sensor returns an analog voltage proportional to the rotation about the Z-axis in degrees/sec. The temperature component returns a proportional analog values in degrees C.

This driver was developed using the DFRobot ADXRS610 Gyro Breakout board.

C++ includes: adxrs610.hpp

calibrateZeroPoint(samples=50)[source]

float calibrateZeroPoint(unsigned int samples=50)

This method samples the data pin samples times to produce an average. This value can then be used as the zero point ( setZeroPoint()).

samples: the number of samples to take an average over. The default is 50.

the average of the reading over samples times.

getAngularVelocity()[source]

float getAngularVelocity()

Return the measured angular velocity in degrees/sec.

the current angular velocity in degrees/sec

getDataVolts()[source]

float getDataVolts()

Returns the voltage detected on the DATA analog pin

The detected voltage

getTemperature()[source]

float getTemperature()

Return the measured temperature in Celsius. Note, the datasheet says that this value is very repeatable, but is not an accurate absolute temperature.

the current temperature in C

getTemperatureVolts()[source]

float getTemperatureVolts()

Returns the voltage detected on the TEMP analog pin

The detected voltage

getZeroPoint()[source]

float getZeroPoint()

Return the zero point value.

the current zero point value

setDeadband(deadband)[source]

void setDeadband(float deadband)

This method allows you to specify a deadband region around the zero point of the gyro (at rest). This can be used as a primitive filter to ignore movment around the zero point.

deadband: The voltage around the zero point which will be ignored

setZeroPoint(zeroPoint)[source]

void setZeroPoint(float zeroPoint)

Set the zero point. This is the point measured and averaged when the sensor is not moving. It is set at construction time (averaged over a number of samples), but can be overridden here.

zeroPoint: The averaged zero point of the sensor at rest