Custom character on PiFace Control And Display

Difficulty: medium

Have a great idea for a project, but need your own custom character? Learn how to create cool custom bitmaps with PiFace Control And Display

Generating custom characters

Have a great idea for a project, but need your own custom bitmap? There are a number of different ways to generate your own custom characters

CustomCharacterCAD

We have created a fun little tool to help you see what your bitmap looks like before you've created it!
Open a Terminal and enter the command
git clone https://github.com/thomasmacpherson/customCharacterCAD.git

Run this generator with the command
python3 customCharacterCAD/customCharacterGenerator.py

When this tool starts up, the PiFace Control And Display screen will light up and a little black dot will appear in the top left corner of the screen. Move this dot with four leftmost buttons on the PiFace CAD (left, down, up, right respectively). Press the fifth button to invert (set) this pixel, when you navigate away from this pixel you will notice it says set. Repeat this process until you have designed your custom character (remember the fifth button inverts, so a black dot will be removed when this button is pressed). You can invert all the pixels in this character by flicking the rocker switch to the left. You can reset the generator by flicking the rocker switch to the right.

Once you have the design how you like it, press in the rocker switch and the binary bitmap values will be printed out. Copy these your values into the LCDBitmap command in your project and hey presto!

Online bitmap editor

You could also use this site that has a great LCD bitmap editor.

Set the Character size to ‘5 by 8’ in the drop down menu and start clicking the black and green squares on and off until you have a design you are happy with. Now copy the ‘In hex’ values that appear to the right of your design, it should look something like this:
0x0,0xe,0x11,0x15,0x11,0xe,0x0,0x0

Copy these your values into the LCDBitmap command.