0.56" 4-digit 7-segment LED backpack

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
billf
 
Posts: 51
Joined: Mon Jun 20, 2011 9:58 am

0.56" 4-digit 7-segment LED backpack

Post by billf »

The backpack has this number on the back: HT16K33

I'm driving my two (4-digit, 7-segment) displays via an I2C bus. Everything works fine, but my question is this: is there code that will turn off the display? I want my project to display data in some modes and not in others, so how do I turn off the display in software?

Thank you!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 0.56" 4-digit 7-segment LED backpack

Post by adafruit_support_rick »

You don't turn it off - you just write blanks to the display. I don't have one in front of me right now, so I can't test this, but you can try

Code: Select all

matrix.println();
You can also try

Code: Select all

for (int i = 0; i < 4; i++)
  matrix.print(' ');
You can also try

Code: Select all

for (int i = 0; i <= 4; i++)
  matrix.writeDigitRaw(i, 0);

User avatar
billf
 
Posts: 51
Joined: Mon Jun 20, 2011 9:58 am

Re: 0.56" 4-digit 7-segment LED backpack

Post by billf »

Rick,

thank you very much for the answer. I used your code for my application and it works very well! Here is the code I used - modified for my project.

Code: Select all

                    for (int i = 0; i <= 4; i++)
                       {
                        matrixGreen.writeDigitRaw(i, 0);
                        matrixYellow.writeDigitRaw(i, 0);
                       } 
                    matrixGreen.writeDisplay();
                    matrixYellow.writeDisplay();

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 0.56" 4-digit 7-segment LED backpack

Post by adafruit_support_rick »

Great!

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”