(…am I too sexy for?)

Of course, there can only be one answer to this, namely: “My Cat!!”

Check out the blurred photo to the right, and you’ll see my prototype display showing different numbers on different digits.It works!

“SO??!!” You scream.

Ah, and therein lies the rub, so to speak.

What you’re seeing here, Dear Reader is thanks to persistence of vision (…and slowness of camera sensor…).  You’re only seeing one digit at a time.

First, the PIC puts out the ‘6’, leaves it for a millisecond, then it puts out a ‘7’ on the next display, again for a millisecond.  And so on.

Those little displays are multiplexed.  The PIC isn’t displaying all the digits at once -it only looks like it is.

AND its doing it all via interrupts -meaning the PIC is free to do other stuff -like monitor the bikes- in the foreground.

So in The Wardian Household, today there is great joy and gladness.

Now, a shower, a cup of tea, a couple of slices of toast, and then?

Well, I’ll carry on, of course!

11.55 Update.

Corrected small bug -not all the digits were counting up to 9.  A simple ‘mod’ (%10) function cured this. (‘mod’ = ‘modulus’ -remember them from school?)

Now, onto getting it to count ‘clicks’ from the bike’s rear wheel.  Then a little maths, and it’ll give an accurate measure of distance cycled.

 

Print Friendly