You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.0 KiB

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. Signedby Signed commit% Linux buildStatus
Minimal RVersion License

co2meter

Retrieve Readings from CO2Mini (Model RAD-0301) Desktop CO2 Monitor

Description

The CO2Mini (model RAD-0301) desktop CO2 monitor from CO2meter.com is a low-cost, fairly accurate personal CO2 environment monitor that can work standalone (via a USB power brick) or be attacked to a computer where it can be both powered and act as a datalogger. Tools are provided to retrieve temperature and CO2 readings from such devices.

NOTE

For the moment, this is hard-wired for macOS. File an issue if you want linux support. For Windows users, please use a better operating system.

What’s Inside The Tin

The following functions are implemented:

  • read_co2: Initialize, read from, and close a co2meter.com device

Installation

remotes::install_git("https://git.rud.is/hrbrmstr/co2meter.git")
# or
remotes::install_gitlab("hrbrmstr/co2meter")
# or
remotes::install_bitbucket("hrbrmstr/co2meter")
# or
remotes::install_github("hrbrmstr/co2meter")

NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.

Usage

library(co2meter)

# current version
packageVersion("co2")
## [1] '0.1.0'
init_co2_meter_dev()

print(read_co2()) # this can take a few seconds
## $temp
## [1] 20.475
## 
## $co2
## [1] 667

print(read_co2()) # this can take a few seconds
## $temp
## [1] 20.475
## 
## $co2
## [1] 667

print(read_co2()) # this can take a few seconds
## $temp
## [1] 20.475
## 
## $co2
## [1] 668

close_dev()

co2 Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
C 3 0.15 1116 0.45 300 0.33 221 0.17
C/C++ Header 3 0.15 104 0.04 123 0.14 354 0.28
R 3 0.15 13 0.01 4 0.00 26 0.02
Rmd 1 0.05 13 0.01 22 0.02 32 0.03
SUM 10 0.50 1246 0.50 449 0.50 633 0.50

clock Package Metrics for co2meter

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.