Python + HTML + Unicorn HAT HD + Raspberry Pi 3


#1

First of all, I want to know. Is there some good docs out there on the UHHD Python Lib? The “Readthedocs” page has nothing but some calls to set pixels and show and clear the Hat. I am working on a project (that is on GitHub) but I need to control the HAT over a localhostconnection. This is kind of similar to the Unicorn Paint but it is more advanced.

Just how would I go about this? I know I have to use Python’s flask module, but how?


#2

Here are some docs: http://docs.pimoroni.com/unicornhathd/


#3

That’s what I said. I’ve read the docs. I want to know how to draw shapes, set letters and numbers, etc. I want to know the full library. I know the UHHD is still a fairly new product but at least could there be some more documentation? I tried to study the examples but that was hard to understand.


#4

That sounds a cool project.
(I really want a HD unicorn, but I haven’t done enough with my standard one to warrant it, yet!)

Unfortunately, I don’t have all the answers you are looking for!

With regards to making shapes, letters and numbers:

  • I believe you would have to put some time in to create some functions to draw squares, etc. using the simple set_pixel methods
  • Letters and numbers you may be lucky, in that I have seen some scrolling text demos for the standard unicorn hat, they might have a library or set of pixel matrices for the characters that you could borrow (with permission).

I’d be very interested to see how you manage to control this from the web as I need to use sudo to run my unicorn hat programs (I haven’t spent the time to see if there is a way to eliminate that). Please post back with a link if you have any code you are willing to share.

Best of luck,

Craig