You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ The following drivers are based on the Adafruit Unified Sensor Driver:
52
52
53
53
Any driver that supports the Adafruit unified sensor abstraction layer will implement the Adafruit\_Sensor base class. There are two main typedefs and one enum defined in Adafruit_Sensor.h that are used to 'abstract' away the sensor details and values:
54
54
55
-
**Sensor Types (sensors\_type\_t)**
55
+
## Sensor Types (`sensors_type_t`)
56
56
57
57
These pre-defined sensor types are used to properly handle the two related typedefs below, and allows us determine what types of units the sensor uses, etc.
58
58
@@ -78,7 +78,7 @@ typedef enum
78
78
} sensors_type_t;
79
79
```
80
80
81
-
**Sensor Details (sensor\_t)**
81
+
## Sensor Details (`sensor_t`)
82
82
83
83
This typedef describes the specific capabilities of this sensor, and allows us to know what sensor we are using beneath the abstraction layer.
84
84
@@ -109,7 +109,7 @@ The individual fields are intended to be used as follows:
109
109
-**resolution**: The smallest difference between two values that this sensor can report (in the appropriate SI unit)
110
110
-**min\_delay**: The minimum delay in microseconds between two sensor events, or '0' if there is no constant sensor rate
111
111
112
-
**Sensor Data/Events (sensors\_event\_t)**
112
+
## Sensor Data/Events (`sensors_event_t`)
113
113
114
114
This typedef is used to return sensor data from any sensor supported by the abstraction layer, using standard SI units and scales.
115
115
@@ -149,7 +149,7 @@ It includes the following fields:
149
149
-**timestamp**: time in milliseconds when the sensor value was read
150
150
-**data[4]**: An array of four 32-bit values that allows us to encapsulate any type of sensor data via a simple union (further described below)
151
151
152
-
**Required Functions**
152
+
## Required Functions
153
153
154
154
In addition to the two standard types and the sensor type enum, all drivers based on Adafruit_Sensor must also implement the following two functions:
155
155
@@ -163,7 +163,7 @@ void getSensor(sensor_t*);
163
163
```
164
164
Calling this function will provide some basic information about the sensor (the sensor name, driver version, min and max values, etc.
165
165
166
-
**Standardised SI values for sensors\_event\_t**
166
+
## Standardised SI values for `sensors_event_t`
167
167
168
168
A key part of the abstraction layer is the standardisation of values on SI units of a particular scale, which is accomplished via the data[4] union in sensors\_event\_t above. This 16 byte union includes fields for each main sensor type, and uses the following SI units and scales:
0 commit comments