ENC03R Class
- ID: enc03r
- Name: Single-axis Analog Gyro Module
- Other Names: Grove Single Axis Analog Gyro
- Category: compass
- Manufacturer: seeed
- Connection: analog
- Kit: robok
- Link: http://www.murata.com/en-us/products/productdetail?partno=ENC-03RC-R
UPM module for the ENC03R single axis analog gyro. This gyroscope measures x-axis angular velocity, that is how fast the sensor is rotating around the x-axis. Calibration of the sensor is necessary for accurate readings.
Item Index
Methods
ENC03R
-
pin
-
aref
ENC03R sensor constructor
Parameters:
-
pin
NumberAnalog pin to use
-
aref
NumberReference voltage to use; default is 5.0 V
Returns:
calibrate
-
samples
Calibrates the sensor by determining an analog reading over many samples with no movement of the sensor. This must be done before attempting to use the sensor.
Parameters:
-
samples
NumberNumber of samples to use for calibration
update
()
Update the internal state with the current reading. This function must be called prior to calling angularVelocity() .
calibrationValue
()
Number
Returns the currently stored calibration value
Returns:
Current calibration value
angularVelocity
()
Number
Computes angular velocity based on the value and stored calibration reference.
Returns:
Computed angular velocity
setOffset
-
offset
Set sensor offset. The offset is applied to the return value before scaling. Default is 0.
Parameters:
-
offset
NumberOffset to apply to value
setScale
-
scale
Set sensor scale. The return value is scaled by this value after the offset is applied. Default is 1.0.
Parameters:
-
scale
NumberScale to apply to value
getNormalized
()
Number
Get a normalized ADC value from the sensor. The return value will be between 0.0 (indicating no voltage) and 1.0 indicating max voltage (aref). update() must be called prior to calling this function.
Returns:
The normalized reading from the ADC.