Rainbow HAT fault with 14 segment alphanumeric display?



I wondered if I’m being a bit daft but whenever a 5 is displayed on the display, it doesn’t look right?

Instead of the traditional 5 I get something like this?


Hope that makes sense?

If not I’ll take a picture…




Are you using the Python API or Android Things?

Sounds like it’s using one of the diagonals not typical on a 7-segment display to make a 5 that’s stylistically different from a capital S.

In the code, the 5 is '5': 0b0010000001101001,

Versus ‘S’ which is 'S': 0b0000000011101101,

Although the S doesn’t look traditional either, since it’s got 6 bits set, not 5 (top, top left, middle, bottom right, bottom)

I don’t have one to look at right now, so a picture may help!

New photo by Scott Fleming [BadBoyBubby]

I’m using the python API



Ah, that will be why ‘S’ has 6 bits set!

You can modify the Python library to replace the value for ‘5’ with the one from ‘S’ if you want the traditional style :D


Thanks gadgetoid, that’s a little beyond my skill set and to be honest I’m cool with it, I really just wanted to make sure it wasn’t faulty hardware.

ps. it’s a brilliant piece of kit, I love it!

thanks again for such a swift response…



Haha, no problem!

It’s easier than it sounds, by the way ;)

I was looking over the font defined here: https://github.com/pimoroni/rainbow-hat/blob/master/library/rainbowhat/alphanum4.py

Each letter is defined as a sequence of 16 bits, each of which corresponds to a segment on the display.