Tvoc
Measures equivalent Total Volatile Organic Compound levels.
import { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
Registers
reading
Total volatile organic compound readings in parts per billion.
type:
Register<number>
(packing formatu22.10
)read only
import { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
const value = await tvoc.reading.read()
- track incoming values
import { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
tvoc.reading.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
readingError
Error on the reading data
type:
Register<number>
(packing formatu22.10
)optional: this register may not be implemented
read only
import { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
const value = await tvoc.readingError.read()
- track incoming values
import { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
tvoc.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 { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
const value = await tvoc.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 { Tvoc } from "@devicescript/core"
const tvoc = new Tvoc()
// ...
const value = await tvoc.maxReading.read()
write
and read
will block until a server is bound to the client.