Skip to content
Discussion options

You must be logged in to vote

The problem arises because this display driver uses 4-bit color. Creating a color involves populating a lookup table: in your script the LUT is un-initialised so all colors are black. This is discussed in the nano-gui docs here.

The simplest approach is to use and import the colors.py file which creates a number of colors and also shows how you can create your own. You also need the boolpalette.py in the drivers directory. The following script works here, with directory paths amended to match the nanogui directory structure.

from machine import Pin, SPI
import gc
from gui.core.writer import CWriter
import gui.fonts.freesans20 as freesans20 # Font to use
from gui.core.colors import *

from d…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@donmerchant
Comment options

@peterhinch
Comment options

Answer selected by peterhinch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants