ECO2
This service is rc and may change in the future.
Measures equivalent CO₂ levels.
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
Registers
reading
Equivalent CO₂ (eCO₂) readings.
type:
Register<number>
(packing formatu22.10
)read only
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
const value = await eCO2.reading.read()
- track incoming values
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
eCO2.reading.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
readingError
Error on the reading value.
type:
Register<number>
(packing formatu22.10
)optional: this register may not be implemented
read only
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
const value = await eCO2.readingError.read()
- track incoming values
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
eCO2.readingError.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
minReading
Minimum measurable value
type:
Register<number>
(packing formatu22.10
)constant: the register value will not change (until the next reset)
read only
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
const value = await eCO2.minReading.read()
write
and read
will block until a server is bound to the client.
maxReading
Minimum measurable value
type:
Register<number>
(packing formatu22.10
)constant: the register value will not change (until the next reset)
read only
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
const value = await eCO2.maxReading.read()
write
and read
will block until a server is bound to the client.
variant
Type of physical sensor and capabilities.
type:
Register<number>
(packing formatu8
)optional: this register may not be implemented
constant: the register value will not change (until the next reset)
read only
import { ECO2 } from "@devicescript/core"
const eCO2 = new ECO2()
// ...
const value = await eCO2.variant.read()
write
and read
will block until a server is bound to the client.