adafruit / Adafruit_CircuitPython_HT16K33

Adafruit CircuitPython driver for the HT16K33, a LED matrix driver IC.
MIT License
41 stars 29 forks source link

Fixed Flicker for Numbers when Autowrite is on #30

Closed makermelissa closed 5 years ago

makermelissa commented 5 years ago

Fixed Flicker for Numbers when Autowrite is on

See https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/issues/29

makermelissa commented 5 years ago

I also tested that this didn't break the work I did for Adafruit_CircuitPython_FeatherWing.

Note: This was only tested on the 14-Segment display as that's all I have at the moment.

caternuson commented 5 years ago

That will cover it for an actual number input:

disp.print(1234)

but not for string:

disp.print("1234")

Take a look at how print() routes to either _text or _number. For a string entry, it goes straight to _text and would bypass the auto_write disable in _number.

How about:

makermelissa commented 5 years ago

Yeah, I especially noticed it with the numbers. I'll go ahead and experiment with it some more and write a little test script that can work for strings too. Something along the lines of:

count = 1000
while count < 9000:
    count += 1 
    display.print("{}".format(count))
    time.sleep(0.1)

That should make any flickering pretty evident.

makermelissa commented 5 years ago

I did as you suggested and it looks good so far. I want to test some more before I call it good.

caternuson commented 5 years ago

Cool. Ping me when you're ready for another look. I've got the other displays and can test them.

makermelissa commented 5 years ago

Yep @caternuson. It's ready for you to take another look.

caternuson commented 5 years ago

Let's good. Tested and working on a 7 segment.

Thanks for the fix.