DS18B20 module, support single bus control, and read temperature.
Read temperature, return a number, makecode do not support floats, so the value is amplifies up to 100 times.
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)
})
GUI
- for PXT/microbit (The metadata above is needed for package search.)