zephyr.zsensor – Zephyr sensor bindings.
Zephyr sensor bindings.
The zsensor
module contains a class for using sensors with Zephyr.
Attributes
Acceleration on the X axis, in m/s^2. |
|
Acceleration on the Y axis, in m/s^2. |
|
Acceleration on the Z axis, in m/s^2. |
|
Altitude, in meters. |
|
Device die temperature in degrees Celsius. |
|
Angular velocity around the X axis, in radians/s. |
|
Angular velocity around the Y axis, in radians/s. |
|
Angular velocity around the Z axis, in radians/s. |
|
Humidity, in percent. |
|
Illuminance in visible spectrum, in lux. |
|
Magnetic field on the X axis, in Gauss. |
|
Magnetic field on the Y axis, in Gauss. |
|
Magnetic field on the Z axis, in Gauss. |
|
Pressure in kilopascal. |
|
Proximity. Dimensionless. A value of 1 indicates that an object is close. |
Classes
Device names are defined in the devicetree for your board. |
Module Contents
- class zephyr.zsensor.Sensor(device_name)
Device names are defined in the devicetree for your board. For example, the device name for the accelerometer in the FRDM-k64f board is “FXOS8700”.
- get_int(sensor_channel) int
Returns only the integer value of the measurement sample. (Ex. value of
(1, 500000)
returns as1
)
- get_micros(sensor_channel) Incomplete
Returns the value of the sensor measurement sample in millionths. (Ex. value of
(1, 500000)
returns as1500000
)
- get_millis(sensor_channel) Incomplete
Returns the value of sensor measurement sample in thousandths. (Ex. value of
(1, 500000)
returns as1500
)
- measure() Incomplete
Obtains a measurement sample from the sensor device using Zephyr sensor_sample_fetch and stores it in an internal driver buffer as a useful value, a pair of (integer part of value, fractional part of value in 1-millionths). Returns none if successful or OSError value if failure.
- zephyr.zsensor.ACCEL_X: Incomplete
Acceleration on the X axis, in m/s^2.
- zephyr.zsensor.ACCEL_Y: Incomplete
Acceleration on the Y axis, in m/s^2.
- zephyr.zsensor.ACCEL_Z: Incomplete
Acceleration on the Z axis, in m/s^2.
- zephyr.zsensor.ALTITUDE: Incomplete
Altitude, in meters.
- zephyr.zsensor.DIE_TEMP: Incomplete
Device die temperature in degrees Celsius.
- zephyr.zsensor.GYRO_X: Incomplete
Angular velocity around the X axis, in radians/s.
- zephyr.zsensor.GYRO_Y: Incomplete
Angular velocity around the Y axis, in radians/s.
- zephyr.zsensor.GYRO_Z: Incomplete
Angular velocity around the Z axis, in radians/s.
- zephyr.zsensor.HUMIDITY: Incomplete
Humidity, in percent.
- zephyr.zsensor.LIGHT: Incomplete
Illuminance in visible spectrum, in lux.
- zephyr.zsensor.MAGN_X: Incomplete
Magnetic field on the X axis, in Gauss.
- zephyr.zsensor.MAGN_Y: Incomplete
Magnetic field on the Y axis, in Gauss.
- zephyr.zsensor.MAGN_Z: Incomplete
Magnetic field on the Z axis, in Gauss.
- zephyr.zsensor.PRESS: Incomplete
Pressure in kilopascal.
- zephyr.zsensor.PROX: Incomplete
Proximity. Dimensionless. A value of 1 indicates that an object is close.