20 #ifndef _ADAFRUIT_SENSOR_H 21 #define _ADAFRUIT_SENSOR_H 34 #define SENSORS_GRAVITY_EARTH (9.80665F) 35 #define SENSORS_GRAVITY_MOON (1.6F) 36 #define SENSORS_GRAVITY_SUN (275.0F) 37 #define SENSORS_GRAVITY_STANDARD (SENSORS_GRAVITY_EARTH) 38 #define SENSORS_MAGFIELD_EARTH_MAX (60.0F) 39 #define SENSORS_MAGFIELD_EARTH_MIN (30.0F) 40 #define SENSORS_PRESSURE_SEALEVELHPA (1013.25F) 41 #define SENSORS_DPS_TO_RADS (0.017453293F) 42 #define SENSORS_GAUSS_TO_MICROTESLA (100) 47 SENSOR_TYPE_ACCELEROMETER = (1),
48 SENSOR_TYPE_MAGNETIC_FIELD = (2),
49 SENSOR_TYPE_ORIENTATION = (3),
50 SENSOR_TYPE_GYROSCOPE = (4),
51 SENSOR_TYPE_LIGHT = (5),
52 SENSOR_TYPE_PRESSURE = (6),
53 SENSOR_TYPE_PROXIMITY = (8),
54 SENSOR_TYPE_GRAVITY = (9),
55 SENSOR_TYPE_LINEAR_ACCELERATION = (10),
56 SENSOR_TYPE_ROTATION_VECTOR = (11),
57 SENSOR_TYPE_RELATIVE_HUMIDITY = (12),
58 SENSOR_TYPE_AMBIENT_TEMPERATURE = (13),
59 SENSOR_TYPE_OBJECT_TEMPERATURE = (14),
60 SENSOR_TYPE_VOLTAGE = (15),
61 SENSOR_TYPE_CURRENT = (16),
62 SENSOR_TYPE_COLOR = (17)
sensors_vec_t orientation
orientation values are in degrees */
Definition: Adafruit_CPlay_Sensor.h:111
Definition: Adafruit_CPlay_Sensor.h:66
Sensor API class for CircuitPlayground board.
Definition: Adafruit_CPlay_Sensor.h:143
float b
Blue component */.
Definition: Adafruit_CPlay_Sensor.h:91
float x
x-axis G data
Definition: Adafruit_CPlay_Sensor.h:70
float light
light in SI lux units */
Definition: Adafruit_CPlay_Sensor.h:115
virtual bool getEvent(sensors_event_t *)=0
enable auto-ranging for the sensor
float r
Red component */.
Definition: Adafruit_CPlay_Sensor.h:89
float g
Green component */.
Definition: Adafruit_CPlay_Sensor.h:90
Definition: Adafruit_CPlay_Sensor.h:126
float voltage
voltage in volts (V) */
Definition: Adafruit_CPlay_Sensor.h:119
int32_t version
version of the hardware + driver */
Definition: Adafruit_CPlay_Sensor.h:129
float pressure
pressure in hectopascal (hPa) */
Definition: Adafruit_CPlay_Sensor.h:116
int32_t type
this sensor's type (ex. SENSOR_TYPE_LIGHT) */
Definition: Adafruit_CPlay_Sensor.h:131
float distance
distance in centimeters */
Definition: Adafruit_CPlay_Sensor.h:114
sensors_vec_t acceleration
acceleration values are in meter per second per second (m/s^2) */
Definition: Adafruit_CPlay_Sensor.h:109
sensors_vec_t magnetic
magnetic vector values are in micro-Tesla (uT) */
Definition: Adafruit_CPlay_Sensor.h:110
int32_t sensor_id
unique sensor identifier */
Definition: Adafruit_CPlay_Sensor.h:130
float min_value
minimum value of this sensor's value in SI units */
Definition: Adafruit_CPlay_Sensor.h:133
int8_t status
sensor status
Definition: Adafruit_CPlay_Sensor.h:80
uint32_t rgba
24-bit RGBA value */
Definition: Adafruit_CPlay_Sensor.h:94
int32_t sensor_id
unique sensor identifier */
Definition: Adafruit_CPlay_Sensor.h:102
int32_t timestamp
time is in milliseconds */
Definition: Adafruit_CPlay_Sensor.h:105
Definition: Adafruit_CPlay_Sensor.h:99
virtual void getSensor(sensor_t *)=0
get information on the sensor
int32_t reserved0
reserved */
Definition: Adafruit_CPlay_Sensor.h:104
float current
current in milliamps (mA) */
Definition: Adafruit_CPlay_Sensor.h:118
Definition: Adafruit_CPlay_Sensor.h:85
sensors_color_t color
color in RGB component values */
Definition: Adafruit_CPlay_Sensor.h:120
float roll
Rotation around the longitudinal axis (the plane body, 'X axis'). Roll is positive and increasing whe...
Definition: Adafruit_CPlay_Sensor.h:75
float z
z-axis G data
Definition: Adafruit_CPlay_Sensor.h:72
float heading
Angle between the longitudinal axis (the plane body) and magnetic north, measured clockwise when view...
Definition: Adafruit_CPlay_Sensor.h:77
float y
y-axis G data
Definition: Adafruit_CPlay_Sensor.h:71
float relative_humidity
relative humidity in percent */
Definition: Adafruit_CPlay_Sensor.h:117
float temperature
temperature is in degrees centigrade (Celsius) */
Definition: Adafruit_CPlay_Sensor.h:113
virtual void enableAutoRange(bool enabled)
enable or disable auto-ranging for the sensor
Definition: Adafruit_CPlay_Sensor.h:157
int32_t version
must be sizeof(struct sensors_event_t) */
Definition: Adafruit_CPlay_Sensor.h:101
sensors_vec_t gyro
gyroscope values are in rad/s */
Definition: Adafruit_CPlay_Sensor.h:112
float max_value
maximum value of this sensor's value in SI units */
Definition: Adafruit_CPlay_Sensor.h:132
int32_t type
sensor type */
Definition: Adafruit_CPlay_Sensor.h:103
float resolution
smallest difference between two values reported by this sensor */
Definition: Adafruit_CPlay_Sensor.h:134
int32_t min_delay
min delay in microseconds between events. zero = not a constant rate */
Definition: Adafruit_CPlay_Sensor.h:135
float pitch
Rotation around the lateral axis (the wing span, 'Y axis'). Pitch is positive and increasing when mov...
Definition: Adafruit_CPlay_Sensor.h:76