Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 507 Bytes

README.md

File metadata and controls

33 lines (30 loc) · 507 Bytes

co2monitor

About

Get sensor values (CO2, humidity, and temperature) from UD-CO2S. The source code currently assumes that the device is available as /dev/tty.usbmodemXXXX.

Run

# Build
go build co2monitor.go
# Run
./co2monitor
# To stop, press ctrl-c

Outputs

$ ./co2monitor
{
  "co2": 699,
  "hum": 46.7,
  "temp": 30.8
}
{
  "co2": 699,
  "hum": 46.7,
  "temp": 30.8
}
{
  "co2": 699,
  "hum": 46.6,
  "temp": 30.7
}