Displayotron hat not working


#1

Hi guys. I have a project I am using a displayotron 3000 for but recently discovered it was replaced by the displayotron hat. I have ordered the newer display and tried using it but can’t get even the examples to light the backlight or display anything - my Pi still works fine with the DOT3K - is there a chance there is a hardware problem with the DOTHAT?

thanks in advance.


#2

have you updated the dot3k to the latest version? what does the following say:

pip list | grep dot3k

what about:

i2cdetect -y 1

#3

Hi - yes - I only installed the Pi from new last week.

It’s dot3k (2.0.0) and I get 2c registered in i2cdetect

Having said all of the above it’s now sprung into life - maybe it was a dirty connection on the GPIO socket or something - as it’s working fine now!

thanks.

John.


#4

Having said that, I’m having difficulty getting the LED’s next to the display to work correctly…

With Dot3K I called backlight.set_bar(0, 150) to illuminate LED 0 with brightness 150, however this doesn’t do anything now with DotHat…

As a test I called backlight.set_graph() and with a value of 0 it turns all the LED’s off, and with anything else (1 or higher) it turns them all on - any ideas what I am doing wrong?

thanks.


#5

set_bar() indeed does nothing for the dothat, you need to use set() instead:

def set(index, value):
    """
    Set a specific LED to a value
    
    Args:
        index (int): index of the LED from 0 to 18
        value (int): brightness value from 0 to 255
    """

set_graph takes a float between 0.0 and 1.0:

def set_graph(percentage):
    """
    Lights a number of bargraph LEDs depending upon value
    
    Args:
        value (float): percentage between 0.0 and 1.0

#6

Ahh - ok - thanks! Can you please let me know what the index values for the 6 led’s along side the screen are? When I use that it seems to set the main backlight brightness rather than the 6 seperate LED’s like I could with set_bar() on Dot3K

thanks!

John.


#7

I think you’re right, the main set() method controls the backlight segments, my bad.

… looking at the graph examples and library here’s what I think defines the ‘graph’ LEDs state:

backlight.graph_set_led_state(index, state)

those LEDs are driven by the cap1xxx chip and therefore can only provide an on/off state.

well, that’s what a semi educated guess - with @gadgetoid whispering in my ears - lead me to believe… have no access to a setup right now, but will check it out later.


#8

perfect - that works a treat - thanks for your help!