pub fn encode_number(num: u16) -> [u8; 4] {
        let mut num = num % 10000;
        let mut bits: [u8; 4] = [0; 4];
        for i in 0..4 {
            let digit = (num % 10) as u8;
            bits[3 - i] = TM1637Adapter::encode_digit(digit);
            num = num / 10;
        }
        bits
    }
/// Encodes a number from 0 to 9999 on the display.
Encodes a number from 0 to 9999 on the display.
Encodes a number from 0 to 9999 on the display .
pub fn encode_number(num: u16) -> [u8; 4] {
        let mut num = num % 10000;
        let mut bits: [u8; 4] = [0; 4];
        for i in 0..4 {
            let digit = (num % 10) as u8;
            bits[3 - i] = TM1637Adapter::encode_digit(digit);
            num = num / 10;
        }
        bits
    }
pub fn encode_number ( num : u16 ) -> [ u8 ; 4 ] { let mut num = num % 10000 ; let mut bits : [ u8 ; 4 ] = [ 0 ; 4 ] ; for i in 0 .. 4 { let digit = ( num % 10 ) as u8 ; bits [ 3 - i ] = TM1637Adapter :: encode_digit ( digit ) ; num = num / 10 ; } bits }
Encodes a number from 0 to 9999 on the display.
Encodes a number from 0 to 9999 on the display .
num
u16