/pxt-ds18b20-calliope

ds18b20 Temperatursensor mit dem Calliope Mini auslesen.

Primary LanguageC++

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.Temperature_number(DS18B20.pin.pin0))
    basic.pause(1000)
    serial.writeLine("temp : " + DS18B20.Temperature_string(DS18B20.pin.pin0))
    basic.pause(1000)
})

License

GUI

Forked from https://github.com/mengbishu/pxt-ds18b20

  • Changed pins for Calliope mini
  • added german translation

Supported targets

  • for PXT/Calliope