File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,31 @@ readPressure(): Promise<number>
167
167
Read temperature returns the celsius degrees.
168
168
Read pressure returns the pressure in Pascals.
169
169
170
+ ### Constants
171
+
172
+ In case that you want or need to work with lower level method, the module exposes several constants to work with:
173
+
174
+ - [ ` REGISTERS ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#registers )
175
+ - [ ` MASKS ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#masks )
176
+ - [ ` OFFSETS ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#offsets )
177
+ - [ ` OVERSAMPLING ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#oversampling )
178
+ - [ ` MODE ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#mode )
179
+ - [ ` STANDBY_TIME ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#standby_time )
180
+ - [ ` IIR_FILTER ` ] ( https://alejandroherr.github.io/async-bmp280/globals.html#iir_filter )
181
+
182
+ Example:
183
+
184
+ ``` javascript
185
+ // ...
186
+ await bmp280 .writeByte (
187
+ REGISTERS .CTRL_MEAS ,
188
+ (OVERSAMPLING .x1 << OFFSETS .OSRS_T ) | (OVERSAMPLING .x1 << OFFSETS .OSRS_P ) | MODE .NORMAL ,
189
+ );
190
+
191
+ const ctrlMeas = await bmp280 .readByte (REGISTERS .CTRL_MEAS );
192
+ const temperatureOversampling = (ctrlMeas & MASKS .OSRS_T ) >>> OFFSETS .OSRS_T ;
193
+ ```
194
+
170
195
### Full example of ` NORMAL ` (mode) usage
171
196
172
197
``` javascript
You can’t perform that action at this time.
0 commit comments