Adafruit driver converted to Mbed OS 6.x.

Dependents:   Adafruit-BNO055-test

Embed: (wiki syntax)

« Back to documentation index

sensors_event_t Struct Reference

sensors_event_t Struct Reference

struct sensor_event_s is used to provide a single sensor event in a common format. More...

#include <Adafruit_Sensor.h>

Data Fields

int version
 must be sizeof(struct sensors_event_t)
int sensor_id
 unique sensor identifier
int type
 sensor type
int reserved0
 reserved
int timestamp
 time is in milliseconds
sensors_vec_t acceleration
 acceleration values are in meter per second per second (m/s^2)
sensors_vec_t magnetic
 magnetic vector values are in micro-Tesla (uT)
sensors_vec_t orientation
 orientation values are in degrees
sensors_vec_t gyro
 gyroscope values are in rad/s
float temperature
 temperature is in degrees centigrade (Celsius)
float distance
 distance in centimeters
float light
 light in SI lux units
float pressure
 pressure in hectopascal (hPa)
float relative_humidity
 relative humidity in percent
float current
 current in milliamps (mA)
float voltage
 voltage in volts (V)
sensors_color_t color
 color in RGB component values

Detailed Description

struct sensor_event_s is used to provide a single sensor event in a common format.

Definition at line 94 of file Adafruit_Sensor.h.


Field Documentation

acceleration values are in meter per second per second (m/s^2)

Definition at line 104 of file Adafruit_Sensor.h.

color in RGB component values

Definition at line 115 of file Adafruit_Sensor.h.

float current

current in milliamps (mA)

Definition at line 113 of file Adafruit_Sensor.h.

float distance

distance in centimeters

Definition at line 109 of file Adafruit_Sensor.h.

gyroscope values are in rad/s

Definition at line 107 of file Adafruit_Sensor.h.

float light

light in SI lux units

Definition at line 110 of file Adafruit_Sensor.h.

magnetic vector values are in micro-Tesla (uT)

Definition at line 105 of file Adafruit_Sensor.h.

orientation values are in degrees

Definition at line 106 of file Adafruit_Sensor.h.

float pressure

pressure in hectopascal (hPa)

Definition at line 111 of file Adafruit_Sensor.h.

relative humidity in percent

Definition at line 112 of file Adafruit_Sensor.h.

int reserved0

reserved

Definition at line 99 of file Adafruit_Sensor.h.

int sensor_id

unique sensor identifier

Definition at line 97 of file Adafruit_Sensor.h.

float temperature

temperature is in degrees centigrade (Celsius)

Definition at line 108 of file Adafruit_Sensor.h.

int timestamp

time is in milliseconds

Definition at line 100 of file Adafruit_Sensor.h.

int type

sensor type

Definition at line 98 of file Adafruit_Sensor.h.

int version

must be sizeof(struct sensors_event_t)

Definition at line 96 of file Adafruit_Sensor.h.

float voltage

voltage in volts (V)

Definition at line 114 of file Adafruit_Sensor.h.