Raspberry + 1-wire temperature sensors DS18B20

I found a nice JS library w1temp library which could be used in JS scripts on raspberry pi. So there is no need for bash, perl or other scripts and parsing data from outputs.

My simple code for read 1 sensor:

var blynkLib = require('blynk-library');
var W1Temp = require('w1temp');

// Setup Blynk (SSL)
var blynk = new blynkLib.Blynk(AUTH); 

// Automatically update sensors value every 5 minutes
setInterval(function() {
W1Temp.getSensor('28-0000045c34f2').then(function (sensor) {
	// print actual temperature 
	var temp = sensor.getTemperature();
	console.log('Actual temp:', temp, 'Ā°C');
            //Report it to server
	blynk.virtualWrite(0, temp);
}, 50000);

THX to kolarcz


Hi, I know this is an old topic but iā€™m trying to link my DS18B20 to my Blynk App.

I have used these instuctions and i have the values showing int he python script.


Iā€™m just wondering how do i install your code which you have wrote so i can use it within blynk?


Please try to read this topic where are a lot of information. For run this code You need to install NODE.