Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

The DS18B20/DS18S20/MAX31820 drivers for temperature sensors are used with either of the DS18B20/DS18S20/MAX31820 sensors to measure the temperature of the sensor's surroundings.


Driver Parameters

The DS18B20/DS18S20/MAX31820 temperature driver for temperature sensing has two parameters that need to be configured:

Pin

Any GP pin that is not already in use is suitable for use with these drivers.

Resolution(F)/(C)

The resolution depends on the measurement system of the central core. If set to imperial, the resolution is in F (degrees Fahrenheit) and in metric it is in C (degrees Celsius).

The resolution in metric is ranging from 0 to 5 Celsius with a default value of 1.

The resolution in imperial is ranging from 0 to 9 degrees Fahrenheit with a default value of 1.

For example in in the metric system, if our latest reading was 25C and the resolution is set to 1.5, the builder base is not going to notify the central core unless the value is <23.5 or >26.5.


Wiring

Example

The GP0 pin is connected to Data Pin on the DS18B20/DS18S20/MAX31820, the 3.3V and GND pins on the Builder Base are then connected to the VCC and GND pins on the DS18B20/DS18S20/MAX31820.

 Breadboard 

Schematic 

Used Pins

Used Pins

Description

GP0 (can be any GP pin)

This pin receives data from the DS18B20/DS18S20/MAX31820

3.3V 

This pin provides the power

GND

This pin provides the GND


How to write an App

Navigate to the App Builder and create a new application. You can find the “Temperature” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.

 

 

 

Drag the “Temperature” Object onto the canvas.

Next, locate the “Text” Object under the Interface tab and drag it onto the canvas.

 

 

 

Finally, connect the “Temperature” port from the Temperature Object to the “In” port on the Text object and save your application.

 


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button button which will open a modal window. Scroll down in the list to find the “Sensor” section and select the “Temperature” hardware option.

Give your device a name, and click “Add Device”

 

 

 

Next, select the “DS18B20/DS18S20/MAX31820” driver under the driver dropdown menu.

 

 

For this example we select:

  • Pin: GP0

  • Resolution: 1

 

 

You may now save your firmware file and upload it to one of your clients.

 

 

 


Supported Hardware

  • DS18B20/DS18S20/MAX31820


Downloads

Apps

View file
nameTemperature App.json

Firmware

View file
nameTemperature Firmware.json

Assets