-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlx90614.ts
57 lines (43 loc) · 1.13 KB
/
mlx90614.ts
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
//% block="Non-contact IR Temperature Sensor"
//% weight=100 color=#5b3fe8 icon="\uf022"
namespace mlx90614 {
export enum DataType {
//% block="Object"
Object = 1,
//% block="Environment"
Environment = 2,
}
export enum Unit {
//% block="℃"
Celsius = 1,
//% block="F"
Fahrenheit = 2,
}
/**
* ...
* @param addr to addr ,eg: 0x5A
*/
//% block="Initialize MLX90614 address as %addr"
//% weight=90
export function init(addr: number) {
}
/**
* ...
* @param factor to factor ,eg: 1
*/
//% block="Set the emissivity calibration coefficient %factor within the range of 0-1"
//% factor.min=0 factor.max=1 factor.defl=1
//% weight=80
export function setCalibration(factor: number) {
}
/**
* ...
* @param type to type ,eg: DataType.Object
* @param unit to unit ,eg: Unit.Celsius
*/
//% block="MLX90614 measurement %type %unit"
//% weight=70
export function measureValue(type: DataType, unit: Unit): number {
return 0;
}
}