Fetching contributors…
Cannot retrieve contributors at this time
72 lines (36 sloc) 1.18 KB

Thermometer - DS18B20

Breadboard for "Thermometer - DS18B20"


Fritzing diagram: docs/breadboard/temperature-ds18b20.fzz


Run this example from the command line with:

node eg/temperature-ds18b20.js
var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
  // This requires OneWire support using the ConfigurableFirmata
  var thermometer = new five.Thermometer({
    controller: "DS18B20",
    pin: 2

  thermometer.on("change", function() {
    console.log(this.celsius + "°C");
    // console.log("0x" + this.address.toString(16));

Additional Notes



Copyright (c) 2012-2014 Rick Waldron Licensed under the MIT license. Copyright (c) 2015-2018 The Johnny-Five Contributors Licensed under the MIT license.