BrailleDisplay
A Braille pattern display module. This module display unicode braille patterns, country specific encoding have to be implemented by the clients.
import { BrailleDisplay } from "@devicescript/core"
const brailleDisplay = new BrailleDisplay()
Registers
enabled
Determines if the braille display is active.
type:
Register<boolean>
(packing formatu8
)read and write
import { BrailleDisplay } from "@devicescript/core"
const brailleDisplay = new BrailleDisplay()
// ...
const value = await brailleDisplay.enabled.read()
await brailleDisplay.enabled.write(value)
- track incoming values
import { BrailleDisplay } from "@devicescript/core"
const brailleDisplay = new BrailleDisplay()
// ...
brailleDisplay.enabled.subscribe(async (value) => {
...
})
note
write
and read
will block until a server is bound to the client.
length
Gets the number of patterns that can be displayed.
type:
Register<number>
(packing formatu8
)constant: the register value will not change (until the next reset)
read only
import { BrailleDisplay } from "@devicescript/core"
const brailleDisplay = new BrailleDisplay()
// ...
const value = await brailleDisplay.length.read()
note
write
and read
will block until a server is bound to the client.