-
Notifications
You must be signed in to change notification settings - Fork 6
Water Temp
Jake Hartnell edited this page Jul 29, 2016
·
2 revisions
Waterproof DS18B20 Digital temperature:
- Purchase: https://www.adafruit.com/product/381
- Johnny-five guide: http://johnny-five.io/examples/temperature-ds18b20/
Note: the wiring is the same though the water based sensor looks different than the one below.
See http://johnny-five.io/examples/temperature-ds18b20/
var five = require("johnny-five");
five.Board().on("ready", function() {
// This requires OneWire support using the ConfigurableFirmata
var temperature = new five.Thermometer({
controller: "DS18B20",
pin: 2
});
temperature.on("change", function() {
console.log(this.celsius + "°C");
// console.log("0x" + this.address.toString(16));
});
});