-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03d4246
commit 5d9d55c
Showing
4 changed files
with
293 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,44 @@ | ||
# co2monitor | ||
|
||
## hardware | ||
[TFA-Dostmann AirControl Mini CO2 Messgerät](http://www.amazon.de/dp/B00TH3OW4Q) | ||
|
||
## example | ||
```javascript | ||
var co2Monitor = require('./co2monitor.js'); | ||
|
||
co2Monitor.data().on('connected', function() { | ||
co2Monitor.startTransfer(); | ||
}) | ||
|
||
co2Monitor.data().on('co2', function(data) { | ||
console.log("co2 " + data); | ||
}) | ||
|
||
co2Monitor.data().on('temp', function(data) { | ||
console.log("temp " + data); | ||
}) | ||
|
||
co2Monitor.connect(); | ||
|
||
``` | ||
|
||
## credits | ||
based on code by [henryk ploetz](https://hackaday.io/project/5301-reverse-engineering-a-low-cost-usb-co-monitor/log/17909-all-your-base-are-belong-to-us) | ||
|
||
## license | ||
[MIT](http://opensource.org/licenses/MIT) | ||
# co2monitor | ||
|
||
## hardware | ||
[TFA-Dostmann AirControl Mini CO2 Messgerät](http://www.amazon.de/dp/B00TH3OW4Q) | ||
|
||
## example | ||
```javascript | ||
const Co2Monitor = require('./co2monitor'); | ||
|
||
let co2Monitor = new Co2Monitor(); | ||
|
||
co2Monitor.on('connected', (device) => { | ||
co2Monitor.startTransfer(); | ||
}); | ||
|
||
co2Monitor.on('error', (error) => { | ||
console.error(error); | ||
}) | ||
|
||
co2Monitor.on('co2', (data) => { | ||
console.log('co2: ' + data); | ||
}) | ||
|
||
co2Monitor.on('temp', (data) => { | ||
console.log('temp: ' + data); | ||
}) | ||
|
||
co2Monitor.on('data', (data) => { | ||
console.log('data: ' + data); | ||
}) | ||
|
||
co2Monitor.on('rawData', (rawData) => { | ||
console.log(rawData); | ||
}) | ||
|
||
co2Monitor.connect(); | ||
|
||
``` | ||
|
||
## credits | ||
based on code by [henryk ploetz](https://hackaday.io/project/5301-reverse-engineering-a-low-cost-usb-co-monitor/log/17909-all-your-base-are-belong-to-us) | ||
|
||
## license | ||
[MIT](http://opensource.org/licenses/MIT) |
Oops, something went wrong.