Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode v1.0 Jun 22, 2018
_locales/zh v1.0 Jun 22, 2018
image 1 Jun 29, 2018
.gitignore v1.0 Jun 22, 2018
.travis.yml
Makefile v1.0 Jun 20, 2018
README.md 1 Jun 29, 2018
ds18b20.cpp 1 Jun 29, 2018
main.ts v1.0 Jun 25, 2018
pxt.json v1.0 Jun 22, 2018
shims.d.ts
test.ts 1 Jun 29, 2018
tsconfig.json v1.0 Jun 20, 2018

README.md

DS18B20 Temperature Sensor for Microbit

Table of Contents

Summary

DS18B20 module, support single bus control, and read temperature.

Blocks

Read temperature, return a number, makecode do not support floats, so the value is amplifies up to 100 times.

image

Read temperature, return a string.

image

Example

Example for JavaScript

basic.forever(() => {
    serial.writeValue("temp ", DS18B20.TemperatureNumber(DS18B20.pin.pin0))
    basic.pause(1000)
    serial.writeLine("temp : " + DS18B20.TemperatureString(DS18B20.pin.pin0))
    basic.pause(1000)
})

License

GUI

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)
You can’t perform that action at this time.