Permalink
Browse files

weatherstation: Revert to Celsius

Revert commit 320ccc3
  • Loading branch information...
1 parent d5063fb commit 23b3ee8740e626e87f206c703cb4e2336c95a8cc @jadonk committed Dec 5, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 weatherstation.js
  2. +1 −1 weatherstation/bmp085-pressure.js
  3. +2 −2 weatherstation/weatherstation.js
View
@@ -41,7 +41,7 @@ setup = function() {
var treadData = function() {
fs.readFile(tfileData, function(err, data) {
if(err) {console.log("Unable to read data: " + err); return;}
- socket.emit('tempdata', "" + Math.round((data / tscale)*10)/10);
+ socket.emit('tempdata', "" + data / tscale);
setTimeout(treadData, tdelay);
});
};
@@ -9,7 +9,7 @@ exports.pressureConfig = {
exports.tempConfig = {
file: "/sys/bus/i2c/drivers/bmp085/3-0077/temp0_input",
- unit: "° F",
+ unit: "° C",
delay: 2000,
scale: 10,
rangeHigh: 40,
@@ -178,7 +178,7 @@ var thermometerSketchProc = function(p) {
}
p.line((thermometerWidth/2) - thermometerWidth/8,theight,(thermometerWidth/2) - thermometerWidth/8 + extra, theight );
- myText = (-30 + i*10)*1.8 + 32;
+ myText = -30 + i*10;
p.fill(0, 0, 0);
p.text(myText, (thermometerWidth/2) - thermometerWidth*0.09 + extra, theight + 4);
@@ -188,7 +188,7 @@ var thermometerSketchProc = function(p) {
p.line((thermometerWidth/2) + thermometerWidth/8,thermometerWidth*1.1 - (thermometerWidth/50) * tmax,(thermometerWidth/2) + thermometerWidth/8 - thermometerWidth/20, thermometerWidth*1.1 - (thermometerWidth/50) * tmax );
p.strokeWeight(thermometerWidth*0.03);
}
- myText = Math.round((temp*1.8 + 32)*10)/10 + tunit;
+ myText = temp + tunit;
p.fill(0, 0, 0);
p.textSize(Math.round(thermometerWidth*0.09));
myWidth = p.textWidth(myText);

0 comments on commit 23b3ee8

Please sign in to comment.