# pxt-ds18b20
**Repository Path**: dfrobot/pxt-ds18b20
## Basic Information
- **Project Name**: pxt-ds18b20
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-02-02
- **Last Updated**: 2025-02-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# DS18B20 Temperature Sensor for Microbit
## Table of Contents
* [Summary](#summary)
* [Blocks](#blocks)
* [Example](#example)
* [License](#license)
## 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.

### Read temperature, return a string.

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