Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
sensors_event_t Struct Reference

#include <Adafruit_Sensor.h>

Public Attributes

int32_t version
 
int32_t sensor_id
 
int32_t type
 
int32_t reserved0
 
int32_t timestamp
 
union {
   float   data [4]
 
   sensors_vec_t   acceleration
 
   sensors_vec_t   magnetic
 
   sensors_vec_t   orientation
 
   sensors_vec_t   gyro
 
   float   temperature
 
   float   distance
 
   float   light
 
   float   pressure
 
   float   relative_humidity
 
   float   current
 
   float   voltage
 
   sensors_color_t   color
 
}; 
 

Detailed Description

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

Member Data Documentation

sensors_vec_t sensors_event_t::acceleration

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

sensors_color_t sensors_event_t::color

color in RGB component values

float sensors_event_t::current

current in milliamps (mA)

float sensors_event_t::distance

distance in centimeters

sensors_vec_t sensors_event_t::gyro

gyroscope values are in rad/s

float sensors_event_t::light

light in SI lux units

sensors_vec_t sensors_event_t::magnetic

magnetic vector values are in micro-Tesla (uT)

sensors_vec_t sensors_event_t::orientation

orientation values are in degrees

float sensors_event_t::pressure

pressure in hectopascal (hPa)

float sensors_event_t::relative_humidity

relative humidity in percent

int32_t sensors_event_t::reserved0

reserved

int32_t sensors_event_t::sensor_id

unique sensor identifier

float sensors_event_t::temperature

temperature is in degrees centigrade (Celsius)

int32_t sensors_event_t::timestamp

time is in milliseconds

int32_t sensors_event_t::type

sensor type

int32_t sensors_event_t::version

must be sizeof(struct sensors_event_t)

float sensors_event_t::voltage

voltage in volts (V)