项目作者: makecode-extensions

项目描述 :
humidity and pressure sensor pxt package
高级语言: TypeScript
项目地址: git://github.com/makecode-extensions/BME280.git
创建时间: 2018-04-09T15:33:48Z
项目社区:https://github.com/makecode-extensions/BME280

开源协议:MIT License

下载


BME280

makecode BME280 Digital Pressure and Humidity Sensor package for micro:bit

Author: shaoziyang
Date: 2018.Mar

usage

open your microbit makecode project, in Add Package, paste

https://github.com/microbit-makecode-packages/BME280

to search box then search.

I2C Address

  • 0x76/0x77

API

  • function pressure()
    get pressure in pa

  • function temperature()
    return temperature in Celsius.

  • function humidity()
    return humidity in percent

  • function PowerOn()
    turn on BME280.

  • function PowerOff()
    goto sleep mode

  • function Address(addr: BME280_I2C_ADDRESS)
    set BME280’s I2C address. addr may be:

    • BME280_I2C_ADDRESS.ADDR_0x76
    • BME280_I2C_ADDRESS.ADDR_0x77

Demo

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

  • for PXT/microbit

From microbit/micropython Chinese community