var BME280 = require('node-bme280');
var barometer = new BME280({address: 0x77});

module.exports = {};

module.exports.load = function () {
	return new Promise(function (resolve, reject) {
		barometer.begin(function(err) {
			if (err) {
				console.info('error initializing barometer', err);
				reject();
			} else {
				console.info('barometer running');
				resolve();
			}
		});
	});
}

module.exports.getData = function () {
	resolve(new Promise(function (resolve, reject) {
		barometer.readPressureAndTemparature(function(err, pressure, temperature, humidity) {
			latestTemp = temperature.toFixed(2);
			latestPressure = (pressure / 100).toFixed(2);
			latestHumidity = humidity.toFixed(2);
			resolve([
				{
					sensorID: 1,
					value: latestTemp,
					unit: "&#176;C",
					measurement: "Temperature",
					location: "ICT office",
					htmlDecimal: 1
				},
				{
					sensorID: 2,
					value: latestHumidity,
					unit: "%",
					measurement: "Humidity",
					location: "ICT office",
					htmlDecimal: 1
				},
				{
					sensorID: 3,
					value: latestPressure,
					unit: "hPa",
					small: true,
					measurement: "Pressure",
					location: "ICT office",
					htmlDecimal: 0
				}
			]);
			//resolve();
		});
	});
};
@@ -427,22 +427,21 @@
 () %7B%0A%09re
-solve(
+turn 
 new Prom
@@ -1201,24 +1201,8 @@
 %5D);%0A
-%09%09%09//resolve();%0A
 %09%09%7D)

fix syntax