Skip to content
Measure CO2 and temperature in nodejs with the TFA-Dostmann AirControl Mini
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore added .npmignore, renaming to co2-monitor Feb 19, 2017
.npmignore added .npmignore, renaming to co2-monitor Feb 19, 2017
LICENSE Initial commit Oct 30, 2015
README.md
co2-monitor.js
example.js added .npmignore, renaming to co2-monitor Feb 19, 2017
package.json

README.md

co2monitor

hardware

TFA-Dostmann AirControl Mini CO2 Messgerät

example

const Co2Monitor = require('./co2monitor');

let co2Monitor = new Co2Monitor();

co2Monitor.on('connected', (device) => {
    co2Monitor.startTransfer();
});

co2Monitor.on('error', (error) => {
    console.error(error);
})

co2Monitor.on('co2', (co2) => {
    console.log('co2: ' + co2);
})

co2Monitor.on('temp', (temp) => {
    console.log('temp: ' + temp);
})

co2Monitor.on('data', (data) => {
    console.log('data: ' + data);
})

co2Monitor.on('rawData', (rawData) => {
    console.log(rawData);
})

co2Monitor.connect();

credits

based on code by henryk ploetz

license

MIT

You can’t perform that action at this time.