Displayotron Hat stops displaying text after extended use


My Display-O-Tron HAT stops displaying text after several hours of being in use.

It requires a reboot to get it going again.

The backlights still does it’s rainbow thing, as well as the bar graph works.

But, text doesn’t display.

Any thoughts? Suggestions?


It’s possible a bad packet of data is confusing the LCD driver leaving it in a hung state or similar. Do you have some sample code that replicates the issue?

from pycgminer import CgminerAPI
from multiprocessing import Process
import dothat.backlight as backlight
import dothat.lcd as lcd
import time
import math

def miner():
	while True:    
		cgminer = CgminerAPI()
		lcd.write("Bitcoin Miner")
		hash = str(cgminer.devs()[u'DEVS'][0][u'MHS 5s']) + " MH/s"
		accepted = "A: " + str(cgminer.devs()[u'DEVS'][0][u'Accepted'])
def light():
	x = 0

	while True:
		x += 1

		backlight.sweep((x % 360) / 360.0)
		#backlight.set_graph(abs(math.sin(x / 100.0)))

if __name__ == '__main__':

Is the code I am using, pretty simple little script. It attaches to CGMiner in the background. The display stops displaying updated text sometime after I leave work.


Could you try adding lcd.clear() before this line?

Also can the result of str(cgminer.devs()[u'DEVS'][0][u'Accepted']) ever be greater than 13 characters?


Interesting, even after a reboot today it’s not working. Maybe I will check my power supply.

Scratch that, after running the demo.py script, it kicked it into working again. May look into my power supply just to be safe. This one is weird.

In response to the 13 characters, it shouldn’t ever be that long. My bitcoin miner doesn’t hash that much, but I could break it from MH/s to GH/s and further reduce characters.


Ok, was just a thought :-) Let us know how you get on!