• Witaj na Forum Arduino Polska! Zapraszamy do rejestracji!
  • Znajdziesz tutaj wiele informacji na temat hardware / software.
Witaj! Logowanie Rejestracja


Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Wyświetlacz 7-segmentowy z TM1637, wyświetlanie kropek
#3
Jeśli korzystasz z biblioteki o której myślę, bo oczywiście mógłbym do Twojej zajrzeć, jeślibyś załączył, to:
Kod:
//! Displayes a decimal number, with dot control
 //!
 //! Dispalyes the given argument as a decimal number. The dots between the digits (or colon)
 //! can be individually controlled
 //!
 //! @param num The number to be shown
 //! @param dots Dot/Colon enable. The argument is a bitmask, with each bit corresponding to a dot
 //!        between the digits (or colon mark, as implemented by each module). i.e.
 //!        For displays with dots between each digit:
 //!        * 0.000 (0b10000000)
 //!        * 00.00 (0b01000000)
 //!        * 000.0 (0b00100000)
 //!        * 0.0.0.0 (0b11100000)
 //!        For displays with just a colon:
 //!        * 00:00 (0b01000000)
 //!        For displays with dots and colons colon:
 //!        * 0.0:0.0 (0b11100000)
 //! @param leading_zero When true, leading zeros are displayed. Otherwise unnecessary digits are
 //!        blank
 //! @param length The number of digits to set. The user must ensure that the number to be shown
 //!        fits to the number of digits requested (for example, if two digits are to be displayed,
 //!        the number must be between 0 to 99)
 //! @param pos The position least significant digit (0 - leftmost, 3 - rightmost)
 void showNumberDecEx(int num, uint8_t dots = 0, bool leading_zero = false, uint8_t length = 4, uint8_t pos = 0);
Miło być decenianym https://buycoffee.to/kaczakat
 
Odpowiedź
  


Wiadomości w tym wątku
RE: Wyświetlacz 7-segmentowy z TM1637, wyświetlanie kropek - przez kaczakat - 27-06-2018, 18:36

Skocz do:


Przeglądający: 2 gości