The name tag can be customized in a number of ways. Let's take a look at the easiest option to change first.

Basic Customizations

HELLO_STRING = "HELLO"
MY_NAME_STRING = "MY NAME IS"
NAME_STRING = "Blinka"
NAME_FONTNAME = "/fonts/Noto-18.bdf"
NEOPIXEL_COUNT = 5
BACKGROUND_COLOR = 0xFF0000
FOREGROUND_COLOR = 0xFFFFFF
BACKGROUND_TEXT_COLOR = 0xFFFFFF
FOREGROUND_TEXT_COLOR = 0x000000

The most obvious customization is changing your name. Just edit NAME_STRING. You can even us a \n newline character in the middle of your string to break your information into two lines. The text will automatically center both horizontally and vertically. You can also change the message at the top by editing HELLO_STRING and MY_NAME_STRING.

The next items to change are the colors of the badge. Colors are Hexadecimal values in the format of RRGGBB. For instance, you can change the red BACKGROUND_COLOR, which is currently 0xFF0000, to anything you like as well as the white FOREGROUND_COLOR

For instance, if we set BACKGROUND_COLOR to 0x0000FF, which is Blue andFOREGROUND_COLOR to 0xFFFF00, which is yellow, the result would look something like this.

You can also easily set the BACKGROUND_TEXT_COLOR to change the text on top of the red background or the FOREGROUND_TEXT_COLOR to change the color of your name.

If you have a custom font that you would like to use, you can set it by changing the NAME_FONTNAME to correct path.

The last item here that you can change is the NEOPIXEL_COUNT. If you have one of the PyBadge LC models with only one NeoPixel, you will want to change this to 1.

Advanced Customizations

Additionally, you can change anything else you want in this name tag which includes:

  • The fonts of the other labels
  • Positions of all the labels
  • Individual colors of the labels
  • Adding graphics
  • Storing and loading the current settings from non-volatile memory
  • Anything else you can think of

This guide was first published on May 28, 2019. It was last updated on May 28, 2019.

This page (Customizing the Name Tag) was last updated on May 10, 2019.

Text editor powered by tinymce.