Quantcast
Channel: Support - Pimoroni Buccaneers
Viewing all articles
Browse latest Browse all 6929

Unicorn HAT HD - Clearing the display on keyboard interrupt for *all* scripts

$
0
0

@shaunmaclean wrote:

I noticed when trying out the various example scripts, some of them clear the display when complete, and some do not. When inspecting the scripts, the ones that don’t are missing the lines:

except KeyboardInterrupt:
    unicorn.off()

But when I add these lines to a script that misses them, the script won’t even run. as though it doesn’t even recognise the command.

Is there any way of having the display clear at the end of every script upon keyboard interrupt, or are there simply some designs that it won’t work for?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6929

Trending Articles