DogFlu66
Member
After the experience in programming the library to work with the TM1637 (6 digits and 6 keys), I have created the library to control the TM1638. In this case, the TM1638-based card that I have used is composed of 8 digits, 8 LEDs and 8 keys. All the elements that it has can be handled individually using the functions created.
For communication with the board, 3 wires or signals are used. The protocol is not I2c or SPI, it uses its own protocol which is very simple.
The main functions are the following:
SmgDisplayTM1638(): initializes the display.
BrightTM1638(MAX_BRIGHT): sets the brightness level.
DisplayStringTM1638(string): sends a string type data to the display, it is the multipurpose function par excellence (allows you to send any type of variable after converting it to string).
WriteRawDigitTM1638(Byte, digito): sends a byte type value (integer) individually to each digit of the display.
DisplayValuesTM1638(Byte0, ....., Byte7): sends 8 bytes (integer) simultaneously that correspond to each one of the digits.
WriteRawLedTM1638(status, LEDx): turns on or off the LED indicated on the card.
ScanKeyTM1638(): reads each one of the keys individually or simultaneously.
I'm leaving the files for anyone who wants to order one of these low-priced cards and wants to play with it for a while.
For communication with the board, 3 wires or signals are used. The protocol is not I2c or SPI, it uses its own protocol which is very simple.
The main functions are the following:
SmgDisplayTM1638(): initializes the display.
BrightTM1638(MAX_BRIGHT): sets the brightness level.
DisplayStringTM1638(string): sends a string type data to the display, it is the multipurpose function par excellence (allows you to send any type of variable after converting it to string).
WriteRawDigitTM1638(Byte, digito): sends a byte type value (integer) individually to each digit of the display.
DisplayValuesTM1638(Byte0, ....., Byte7): sends 8 bytes (integer) simultaneously that correspond to each one of the digits.
WriteRawLedTM1638(status, LEDx): turns on or off the LED indicated on the card.
ScanKeyTM1638(): reads each one of the keys individually or simultaneously.
I'm leaving the files for anyone who wants to order one of these low-priced cards and wants to play with it for a while.
Attachments
Last edited: