DOT3K White LED bars

How do you keep the white LEDS permanently off

they’re very bright!

All of the LEDs on Dot3K (white bar graph and the backlight for the display) are PWM controlled which means you can set them to any brightness you like!

What’s the code you’re running to enable the bargraph LEDs?

1 Like

which code to turn them off completely - is it set_bar ?

I believe so! With a “value” of 0 the lights should be off completely.

1 Like

I must be missing something -

this code has no effect.

backlight.set_bar(8,0)
backlight.set_bar(7,0)
backlight.set_bar(5,0)
backlight.set_bar(4,0)
backlight.set_bar(3,0)
backlight.set_bar(2,0)
backlight.set_bar(1,0)
backlight.set_bar(0,0)

How are you turning them on in the first place? Did you run an earlier script that uses them for something?

I fired up an interactive python and I could toggle them on/off like so:

sudo python
>>> import dot3k.backlight as bl
>>> bl.set_bar(0,255)
>>> bl.set_bar(0,0)
1 Like

I don’t want to toggle them I want them completely off.

running those commands just momentarily flashes them - but they don’t stay off.

Unless you’ve got another script running that’s turning them back on, they shouldn’t be on at all. They’re certainly not turned on by default!

Have you tried shutting down, disconnecting and reconnecting power and trying again? That should eliminate any external factors that might be keeping them turned on.

Under normal circumstances, they should turn off with exactly the commands you listed.

1 Like

I have nothing else running. they always come on during a reboot

and bl.set_bar(0,0) has no effect at all other than flashing them on and off?

1 Like

I think I found the problem - it was previous piglow script that was running on boot?

Yeah, that’d do it.

The DoT3K does a lot in a small and beautifully formed package (and cheap, too). With I2C, SPI and some GPIO stuff going on, it is very easy to have some residual stuff lying around on your machine from an install of a previous add-on.

I found the best way to trouble-shoot was to put a fresh bare Raspbian install on a spare SD card and test from that.

1 Like

Aha! That completely explains it :-)

The backlight and bargraph on DOT3K are powered by the same chip used on PiGlow :-) We used it as we’re familiar with it and it’s a great little LED driver!

1 Like

yeah - so worked fine, when I disabled a piglow clock script.

all working good now.

indeed it’s an awesome piece of kit when up and running!

1 Like