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?
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?
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
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
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.