Use a Printer to render any hardware variables as text.

Screenshot of component Printer basic


Printers accept standard accessor strings or StateTree as discussed in the accessors and writers guide.

import { Printer } from '@electricui/components-desktop'
<Printer accessor="distance" />


The precision of floating point numbers is controllable. By default a Printer will render integers without decimal places 128, and floats with two decimal places 3.14.

Screenshot of component Printer with-precision
<Printer accessor="intensity" precision={0} />
<Printer accessor="intensity" precision={1} />
<Printer accessor="intensity" precision={2} />
<Printer accessor="intensity" precision={4} />
<Printer accessor="intensity" precision={8} />


Pass CSS to the inline span element with style.

Twoslash failure

Errors were thrown in the sample, but not included in an errors tag

These errors were not marked as being expected: 2304.
Expected: // @errors: 2304

Compiler Errors:

[2304] 8 : Cannot find name 'Colors'.

Raising Code:

## Code

0 import React from 'react'
1 import { Printer } from '@electricui/components-desktop'
2 // ---cut---
3 <Printer 
4   accessor="intensity" 
5   style={{
6     fontSize: '4em',
7     fontWeight: "bold",
8     color: `${Colors.RED2}`
9   }} 
10 />