Vue>> NTC>> 返回
项目作者: makecode-extensions

项目描述 :
makecodeNTC sensor package for microbit
高级语言: TypeScript
项目地址: git://github.com/makecode-extensions/NTC.git
创建时间: 2018-03-05T02:50:58Z
项目社区:https://github.com/makecode-extensions/NTC

开源协议:MIT License

下载


NTC

makecode NTC Temperature Sensor extension for microbit

Author: shaoziyang
Date: 2018.Mar

Add extension

open your microbit makecode project, in Extensions, paste

https://github.com/makecode-packages/NTC

to search box then search.

Basic usage

  1. let AmbientTemperature = 0
  2. NTCSenor.set(NTC_B.B3950)
  3. AmbientTemperature = NTCSenor.Temperature(pins.analogReadPin(AnalogPin.P1))

Circuit

API

  • set(B: NTC_B)
    B-value is a tendency for resistance in temperature change, it maybe 3380 or 3950 here.

  • Temperature(adc: number)
    adc is the result of analog input. Function will return temperature in degree Celsius.

Demo

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

  • for PXT/microbit

From microbit/micropython Chinese community