WindDirection
caution
This service is rc and may change in the future.
A sensor that measures wind direction.
import { WindDirection } from "@devicescript/core"
const windDirection = new WindDirection()
Registers
reading
The direction of the wind.
type:
Register<number>
(packing formatu16
)read only
import { WindDirection } from "@devicescript/core"
const windDirection = new WindDirection()
// ...
const value = await windDirection.reading.read()
- track incoming values
import { WindDirection } from "@devicescript/core"
const windDirection = new WindDirection()
// ...
windDirection.reading.subscribe(async (value) => {
...
})
note
write
and read
will block until a server is bound to the client.
readingError
Error on the wind direction reading
type:
Register<number>
(packing formatu16
)optional: this register may not be implemented
read only
import { WindDirection } from "@devicescript/core"
const windDirection = new WindDirection()
// ...
const value = await windDirection.readingError.read()
- track incoming values
import { WindDirection } from "@devicescript/core"
const windDirection = new WindDirection()
// ...
windDirection.readingError.subscribe(async (value) => {
...
})
note
write
and read
will block until a server is bound to the client.