forked from fivdi/bme280
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbme280.d.ts
More file actions
60 lines (49 loc) · 1.02 KB
/
bme280.d.ts
File metadata and controls
60 lines (49 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
export type options = {
i2cBusNumber?: number,
i2cAddress?: number,
humidityOversampling?: OVERSAMPLE,
pressureOversampling?: OVERSAMPLE,
temperatureOversampling?: OVERSAMPLE,
filterCoefficient?: FILTER,
standby?: STANDBY,
forcedMode?: boolean
}
export type data = {
temperature: number,
pressure: number,
humidity: number
}
export enum OVERSAMPLE {
SKIPPED = 0,
X1 = 1,
X2 = 2,
X4 = 3,
X8 = 4,
X16 = 5
}
export enum FILTER {
OFF = 0,
F2 = 1,
F4 = 2,
F8 = 3,
F16 = 4
}
export enum STANDBY {
MS_0_5 = 0,
MS_62_5 = 1,
MS_125 = 2,
MS_250 = 3,
MS_500 = 4,
MS_1000 = 5,
MS_10 = 6,
MS_20 = 7
}
export function open(options?: options): Promise<Bme280>;
export class Bme280 {
constructor(bme280I2c: any);
public read(): Promise<data>;
public triggerForcedMeasurement(): Promise<void>;
public typicalMeasurementTime(): number;
public maximumMeasurementTime(): number;
public close(): Promise<void>;
}