new library arduino for TM1638 modules

Hi

TWIC

New library Arduino for TM1638 modules.

Overview

  • Name: TM1638plus
  • Description: An Arduino library to display data on a 8-digit TM1638 seven segment module
    This module is for the (KEY & LED) variant which has 8 LED's and 8 Push buttons.

TM1638plus

Thanks so much for this contribution to the Arduino project typematrix!

Am I being dense?
I’m unable to see how to extract the “button” status to carry out another function elsewhere/

I’d be grateful for a few pointers.

BrianO:
Am I being dense?
I’m unable to see how to extract the “button” status to carry out another function elsewhere/

I’d be grateful for a few pointers.

Bit late to answer I have not logged into forum in a Since September ,
the readme says
“For more information see the commented headers in header file.”
so the main documentation is in the header file.
And that states.
"Read buttons returns a byte with value of buttons 1-8 b7b6b5b4b3b2b1b0
1 pressed, zero not pressed. … "

So if user pressed S1 switch on module b0 is 1 and so on.
You can read the 8 buttons by cycling thru them with a bit shift as per the example file in examples.
or another way is to use a switch statement:

 uint8_t buttons = buttonsRead();

    switch (buttons)
    {
      case  0x01 : //S1 Pressed 0000 0001 ; break; 
      case  0x02 : // S2 Pressed 0000 0010 ; break;
      case  0x04 : // S3 Pressed 0000 0100 ; break;
      case  0x08 : // S4 Pressed 0000 1000 ; break;
      case  0x10 : // S5 Pressed 0001 0000 ; break;
      case  0x20 : // S6 Pressed 0010 0000 ; break;
      case  0x40 : // S7 Pressed 0100 0000 ; break;
      case  0x80 : // S8 Pressed 1000 0000 ; break;  
    }

Also I have released some new versions since OP It now support the TM1638 Module 16 Push buttons (16 KEY)
as well.

Tm1638plus changelog