The problem was caused by the fact that the
img
object was being garbage collected after the
LED.__init__
method completed, so the canvas appeared blank. Adding something like the extra line below holds it in place.
img=PhotoImage(master = canvas, width=WIDTH, height=HEIGHT)
canvas.create_image((WIDTH/2, HEIGHT/2), image=img, state="normal")
canvas.theimage = img