SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By madbodger
That's known as "leading zero blanking". Normally when I do this, I go the other way (high digits to low digits), and have a blanking flag that starts as "true" and is set to "false" when I encounter the first non-zero digit or get to the last digit (so as not to blank the entire display). When displaying a digit, I check the flag and only disply the digit if the flag is false. However, this would be a large rewrite to your code (expecially as it looks like the large digit driver goes the other way).

Therefore, I'd just do it the quick and dirty way, and take advantage of the fact that there are only two digits and you only need to blank one of them if it's a zero. In the for() loop in showNumber(), before the call to postNumber(), I'd add something like:

if ((byte == 1) && (remainder == 0)) {
// leading digit is zero, blank it
remainder = ' ';

This checks to see if it's the first digit and it's a zero, and if so, it replaces the number with a space. Fortunately, the postNumber() routine has code to display nothing when given a space instead of a number.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]