-
Notifications
You must be signed in to change notification settings - Fork 3
/
extension.ts
34 lines (31 loc) · 945 Bytes
/
extension.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
/**
* Provides support for the BMP280 barometer module.
*/
//% color=#7300ff weight=0 icon="\uf0e4" block="Barometer"
namespace barometer {
/**
* Initialises the BMP280 module
*/
//% block
//% shim=bmp280::init
export function init(): void { return }
/**
* Changes the default I2C address from 0x77 to the provided address
* @param The I2C address to use; eg: 0x76
*/
//% block
//% shim=bmp280::setAddress
export function setAddress(address: number): void { return }
/**
* Returns the pressure read by the BMP280's barometer in hPa
*/
//% block="pressure"
//% shim=bmp280::getPressure
export function getPressure(): number { return 0 }
/**
* Returns the temperature read by the BMP280's temperature sensor in Celcius
*/
//% block="temperature"
//% shim=bmp280::getTemperature
export function getTemperature(): number { return 0 }
}