1 Commits a16f44179e ... c3d789f128

Author SHA1 Message Date
  James Peret c3d789f128 Temperature reading fix 6 years ago
1 changed files with 2 additions and 2 deletions
  1. 2 2
      external_temperature_sensor.js

+ 2 - 2
external_temperature_sensor.js

@@ -8,7 +8,7 @@ module.exports.start = function(channel){
8 8
     console.log(isLoaded);
9 9
     var devices = sensor.list();
10 10
     console.log(devices);
11
-    setInterval(function () {
11
+    setInterval(function (devices, channel) {
12 12
       var temperature = readSensor(devices, channel);
13 13
     }, 5000);
14 14
   }
@@ -16,7 +16,7 @@ module.exports.start = function(channel){
16 16
 
17 17
 }
18 18
 
19
-function readSensor(devices) {
19
+function readSensor(devices, channel) {
20 20
   // Read Sensor data
21 21
   sensor.get(devices[devices.length - 1], function(err, temp){
22 22
   	if(err){