No Description

external_temperature_sensor.js 461B

    var logger = require('winston'); module.exports.start = function(channel){ logger.info("Starting External temperature module"); setInterval(function () { var temperature = readSensor(); channel.emit('temperature_external', { temperature: temperature }); }, 1000); } function readSensor() { // Read Sensor data // give random data for testing var high = 25; var low = 23; var temp = Math.random() * (high - low) + low return temp }