Git Product home page Git Product logo

pxt-ds18b20's Introduction

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.)

pxt-ds18b20's People

Contributors

mengbishu avatar tangjie133 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-ds18b20's Issues

License information

Can you provide more detailed licensing information? I can't find any information about a "GUI" license.

Errors on temp less than 0 or higher than 59.9 degrees C

Hi.

I have been using this very nice addon to Microbit, and thank you for that, but I have issues when reading sub-zero temperatures or above 60 degrees C.
Then the output is somthing like 167.7 no matter what...

Am I doing something wrong or, could I change something to get readings in these areas (Especially sub-zero). I'm a teacher, and i'm about to do some experiments with ice, so it would be massive, if I could use the kids' Micro:bits for it.

Thank you for your work.
Best Regards,
Morten L. Christensen
(Raekon)

Micro:BIT code maker problem.

I get massage "the compiling files Compilation failed, please check your code for errors." when I add the lib to my project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.