Available on crate feature
formatters
only.Expand description
Format numbers into byte arrays.
Functions for converting numbers (i8
s, i16
s, i32
s or f32
s) into arrays of bytes
that can be sent to a TM1637 display.
There are versions of these functions that are meant for 4-digit displays and for 6-digit displays. The 6-digit versions take into account that the order of the bytes does not drectly correlate with the order of the physical digits.
All numbers are aligned to the right.
§Example
ⓘ
tm.write_bytes_raw(0, i16_to_4digits(1234));
This module is only available when the formatters
feature of this
library is activated.