Unverified Commit fc6548b8 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

README: document temperature and ABC readings

parent f4d69938
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -47,13 +47,18 @@ port:on("data", 9, uart_callback)

function uart_callback(data)
	if mh_z19.parse_frame(data) then
		-- mh_z19.co2 contains the CO₂ concentration in ppm
		-- mh_z19.co2       : CO₂ concentration [ppm]
		-- mh_z19.temp      : device temperature [°c]
		-- mh_z19.abc_ticks : ticks since last Automatic Baseline Correction
		-- mh_z19.abc_count : number of Automatic Baseline Corrections performed since power-on
	end
end

port:write(mhz19.c_query)
```

The sensor performs a CO₂ measurement every one to five seconds, depending on hardware revision.

## Application Example

**init.lua** is an example application with HomeAssistant integration.