Use Display-O-Tron HAT Graph LEDs individually?


Hi Pimoroni wizards,

Is it possible to use the six graph LEDs individually, instead of them displaying a value between 0 and 1 as a grpah?

Kind Regards,


Yes; but you can’t control the brightness of the LEDs independently; you can only switch them on and off.

Those 6 graph LEDs are actually drive by the Cap Touch driver chip. It’s not really an LED driver, so it’s a bit odd. It has a global “on” and “off” brightness that affects all the LEDs, and also has the ability to “invert” LEDs so on is off and off is on. Did I mention it’s weird?

All this stuff makes sense when you consider that it’s just designed to blink or flash or pulse some feedback when you touch a button.

As for taking control. Try this:

import dothat.backlight as bl

That should turn the top LED on. They’re numbered 0 through 5.

If you want to control the brightness of them all, you can set the duty cycle like so:


The first argument is the off duty, from 0 to 15, and the second argument is the on duty, from 0 to 15. The brightness control isn’t very granular, but it’s good for making them less glarey!

There are a few more things you can tweak that I haven’t yet exposed in the dothat.backlight library. The Cap Touch chip is capable of fading the LEDs on/off automatically for example.


Awesome, thank you, you rock!

Just received an additional 3 DOTHATs today, and am eager to play.


And by the way, the automatic fading of the LEDs would be awesome. I’m visualizing Jenkins Views and using the LEDs to display build status… fading would be cool to signify a job that is ‘building right now’