Node module for fetching data from the DS18B20 temperature sensor on Raspberry Pi. For real world usage see the Raspberry Pi thermometer project.
First, load the drivers
sudo modprobe w1-gpio
sudo modprobe w1-thermthen determine the device id of your sensor (28-000004e23e98 in my case)
ls /sys/bus/w1/devices/ You will need to provide the device id as a parameter when using the module.
npm install rpi-temp-module --savevar rpiTemp = require('rpi-temp-module');
rpiTemp.getTemperature("28-000004e23e98", funciton(value) {
console.log("Temperature: "+value+"C");
}); npm test