Common sensor interface to unify various sensors. Intentionally modeled after sensors.h in the Android API: https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/sensors.h.
Definition: Adafruit_Sensor.h:170
20 #ifndef _ADAFRUIT_SENSOR_H 21 #define _ADAFRUIT_SENSOR_H 33 #define SENSORS_GRAVITY_EARTH (9.80665F) 34 #define SENSORS_GRAVITY_MOON (1.6F) 35 #define SENSORS_GRAVITY_SUN (275.0F) 36 #define SENSORS_GRAVITY_STANDARD (SENSORS_GRAVITY_EARTH) 37 #define SENSORS_MAGFIELD_EARTH_MAX \ 39 #define SENSORS_MAGFIELD_EARTH_MIN \ 41 #define SENSORS_PRESSURE_SEALEVELHPA \ 43 #define SENSORS_DPS_TO_RADS \ 46 #define SENSORS_RADS_TO_DPS \ 48 #define SENSORS_GAUSS_TO_MICROTESLA \ 53 SENSOR_TYPE_ACCELEROMETER = (1),
54 SENSOR_TYPE_MAGNETIC_FIELD = (2),
55 SENSOR_TYPE_ORIENTATION = (3),
56 SENSOR_TYPE_GYROSCOPE = (4),
57 SENSOR_TYPE_LIGHT = (5),
58 SENSOR_TYPE_PRESSURE = (6),
59 SENSOR_TYPE_PROXIMITY = (8),
60 SENSOR_TYPE_GRAVITY = (9),
61 SENSOR_TYPE_LINEAR_ACCELERATION =
63 SENSOR_TYPE_ROTATION_VECTOR = (11),
64 SENSOR_TYPE_RELATIVE_HUMIDITY = (12),
65 SENSOR_TYPE_AMBIENT_TEMPERATURE = (13),
66 SENSOR_TYPE_OBJECT_TEMPERATURE = (14),
67 SENSOR_TYPE_VOLTAGE = (15),
68 SENSOR_TYPE_CURRENT = (16),
69 SENSOR_TYPE_COLOR = (17),
70 SENSOR_TYPE_TVOC = (18),
71 SENSOR_TYPE_VOC_INDEX = (19),
72 SENSOR_TYPE_NOX_INDEX = (20),
73 SENSOR_TYPE_CO2 = (21),
74 SENSOR_TYPE_eCO2 = (22),
139 float relative_humidity;
Definition: Adafruit_Sensor.h:79
+
Common sensor interface to unify various sensors. Intentionally modeled after sensors.h in the Android API: https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/sensors.h.
Definition: Adafruit_Sensor.h:175
virtual bool getEvent(sensors_event_t *)=0
Get the latest sensor event.
void printSensorDetails(void)
Prints sensor information to serial console.
Definition: Adafruit_Sensor.cpp:8
-
Definition: Adafruit_Sensor.h:153
-
Definition: Adafruit_Sensor.h:120
+
Definition: Adafruit_Sensor.h:158
+
Definition: Adafruit_Sensor.h:122
virtual void getSensor(sensor_t *)=0
Get info about the sensor itself.
-
Definition: Adafruit_Sensor.h:104
-
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:181
+
Definition: Adafruit_Sensor.h:106
+
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:186