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
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,7 @@ typedef struct
161
161
float pm25_env,
162
162
float pm100_env,
163
163
float gas_resistance,
164
+
float unitless_percent,
164
165
sensors_color_t color;
165
166
};
166
167
} sensors_event_t;
@@ -189,7 +190,7 @@ Calling this function will provide some basic information about the sensor (the
189
190
190
191
## Standardised SI values for `sensors_event_t`
191
192
192
-
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:
193
+
A key part of the abstraction layer is the standardization 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:
193
194
194
195
-**acceleration**: values are in **meter per second per second** (m/s^2)
195
196
-**magnetic**: values are in **micro-Tesla** (uT)
@@ -215,12 +216,13 @@ A key part of the abstraction layer is the standardisation of values on SI units
215
216
-**pm25_env**: values are in **parts per million** (ppm)
216
217
-**pm100_env**: values are in **parts per million** (ppm)
217
218
-**gas_resistance**: values are in **ohms**
219
+
-**unitless_percent**: values are in **%**
218
220
219
221
## The Unified Driver Abstraction Layer in Practice ##
220
222
221
223
Using the unified sensor abstraction layer is relatively easy once a compliant driver has been created.
222
224
223
-
Every compliant sensor can now be read using a single, well-known 'type' (sensors\_event\_t), and there is a standardised way of interrogating a sensor about its specific capabilities (via sensor\_t).
225
+
Every compliant sensor can now be read using a single, well-known 'type' (sensors\_event\_t), and there is a standardized way of interrogating a sensor about its specific capabilities (via sensor\_t).
224
226
225
227
An example of reading the [TSL2561](https://github.com/adafruit/Adafruit_TSL2561) light sensor can be seen below:
0 commit comments