Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

HT16K33 - Old data showing on Display
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HT16K33 - Old data showing on Display

by bear_tactics on Tue Sep 01, 2020 7:43 am

Good morning all,

My 1.2" 7 segment display is acting rather funny.

I am trying to display a measurement from a LIDAR on the display. The data coming in is in the form of "210" "211" "33" etc.

Issue is the display seems to hold onto the old data and display it in the left most number. So if the first reading is "210" the display will show _ 2 1 0. But if the next reading is again "210" the display will so 0 2 1 0. Or if the first reading is "56" the display with show _ _ 5 6. but if the next reading is "57" it will show 5 6 5 7.

I hard coded it to see if it was a sensor issue or something but this happens even if my code looks like this:

display.print((56))
display.print((57))

Is there a way to clear the display every scan so I am only showing the most recent measurement?

Thanks!

bear_tactics
 
Posts: 29
Joined: Mon Jul 20, 2020 8:22 am

Re: HT16K33 - Old data showing on Display

by gadjet on Tue Sep 01, 2020 9:12 am

Have you tried display.clear();

gadjet
 
Posts: 5
Joined: Mon Jan 21, 2019 6:51 pm

Re: HT16K33 - Old data showing on Display

by adafruit_support_bill on Tue Sep 01, 2020 9:20 am

There is no 'clear' function in the library. But you could try just printing a string of 4 spaces.

adafruit_support_bill
 
Posts: 78956
Joined: Sat Feb 07, 2009 10:11 am

Re: HT16K33 - Old data showing on Display

by bear_tactics on Tue Sep 01, 2020 9:24 am

I should say I don't want the display to clear I just want the old data gone replaced by the new data.

I'm thinking it's a matter of the memory only holding new data. Is there a way on a Metro M4 Express board to only show new data? I am very new to this world, but I was thinking it may have to do with the cache? Is there a way to disable the cache in circuitpython/MU?

Thanks again.

bear_tactics
 
Posts: 29
Joined: Mon Jul 20, 2020 8:22 am

Re: HT16K33 - Old data showing on Display

by adafruit_support_bill on Tue Sep 01, 2020 9:39 am

I should say I don't want the display to clear I just want the old data gone replaced by the new data.

And the simplest way to do that is to clear the display to flush out the old data before printing the new value.

If you are using python, there is a 'fill' function can be used to do that: https://learn.adafruit.com/adafruit-led ... 3054592-23

Just call display.fill(0) to clear the display.

adafruit_support_bill
 
Posts: 78956
Joined: Sat Feb 07, 2009 10:11 am

Re: HT16K33 - Old data showing on Display

by bear_tactics on Tue Sep 01, 2020 9:44 am

This definitely worked. There is a slight blink when new data is registered but i think I can live with that until I find a way to clear the data without the forced fill.

Thanks for the help.

bear_tactics
 
Posts: 29
Joined: Mon Jul 20, 2020 8:22 am

Please be positive and constructive with your questions and comments.