DFRobot ADXRS610 Gyro Beakout board.  
 More...
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 Beakout board.
 
  
  
  
  
  
  
  
  while (shouldRun)
    {
      
      usleep(100000);
    }
  
 | 
| 
mraa::Aio  | m_aioData | 
|   | 
| 
mraa::Aio  | m_aioTemp | 
|   | 
      
        
          | ADXRS610  | 
          ( | 
          int  | 
          dPin,  | 
        
        
           | 
           | 
          int  | 
          tPin,  | 
        
        
           | 
           | 
          float  | 
          aref = 5.0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
ADXRS610 constructor
- Parameters
 - 
  
    | dPin | Analog pin to use for DATAOUT  | 
    | tPin | Analog pin to use for temperature measurement  | 
    | aref | Analog reference voltage; default is 5.0 V  | 
  
   
 
 
Returns the voltage detected on the DATA analog pin
- Returns
 - The detected voltage 
 
 
 
      
        
          | float getTemperatureVolts  | 
          ( | 
           | ) | 
           | 
        
      
 
Returns the voltage detected on the TEMP analog pin
- Returns
 - The detected voltage 
 
 
 
  
  
      
        
          | void setDeadband  | 
          ( | 
          float  | 
          deadband | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
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.
- Parameters
 - 
  
    | deadband | The voltage around the zero point which will be ignored  | 
  
   
 
 
  
  
      
        
          | void setZeroPoint  | 
          ( | 
          float  | 
          zeroPoint | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
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.
- Parameters
 - 
  
    | zeroPoint | The averaged zero point of the sensor at rest  | 
  
   
 
 
      
        
          | 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()).
- Parameters
 - 
  
    | samples | the number of samples to take an average over. The default is 50.  | 
  
   
- Returns
 - the average of the reading over samples times. 
 
 
 
Return the zero point value.
- Returns
 - the current zero point value 
 
 
 
Return the measured temperature in Celsius. Note, the datasheet says that this value is very repeatable, but is not an accurate absolute temperature.
- Returns
 - the current temperature in C 
 
 
 
      
        
          | float getAngularVelocity  | 
          ( | 
           | ) | 
           | 
        
      
 
Return the measured angular velocity in degrees/sec.
- Returns
 - the current angular velocity in degrees/sec 
 
 
 
The documentation for this class was generated from the following files: