pimoroni / microdot-phat Goto Github PK
View Code? Open in Web Editor NEWPython Library and Examples for Micro Dot pHAT. A 6-matrix driver for retro 5x7 displays!
Home Page: https://shop.pimoroni.com/products/microdot-phat
License: MIT License
Python Library and Examples for Micro Dot pHAT. A 6-matrix driver for retro 5x7 displays!
Home Page: https://shop.pimoroni.com/products/microdot-phat
License: MIT License
I just got started with my Microdot hat, and made a simple clock that shows up in a mirror, so I needed to set both set_rotate180(True) and set_mirror(True).
The digits of the time show properly, however the decimal places, controlled by set_decimal(), now show up at the TOP of the numbers, not the bottom (as they did before the rotating and mirroring).
I haven't fully tracked it down yet, but it looks like the call to set_decimal() in function show() does not account for mirroring or rotating.
Hello
Tinkering with microdot-phat for a tutorial and noticed that a "-" character is not supported. Code fails on this character every time.
Error text
File "/home/pi/news.py", line 29, in <module>
lengths[line] = write_string(text, offset_x=offset_left, offset_y=line_height * line)
File "/usr/lib/python3/dist-packages/microdotphat/__init__.py", line 217, in write_string
char_data = numpy.array(_get_char(char))
File "/usr/lib/python3/dist-packages/microdotphat/__init__.py", line 162, in _get_char
raise ValueError("Unsupported char {}".format(char))
ValueError: Unsupported char —
Line 29 is where this happens
for line, text in enumerate(lines):
lengths[line] = write_string(text, offset_x=offset_left, offset_y=line_height * line)
offset_left += lengths[line]
I'm parsing an RSS feed using feedparser and the list I create is working, but second entry in the list has a "-" in the headline.
Cheers!
Just wanted to point out something. Perhaps it's somewhere in the documentation that I didn't read or was broken to begin with...
I had modified the canned clock example to flip the display and set the brightness to a lower value. This was working great until this evening when I did an apt-get update and got some new libs.
The error is:
Traceback (most recent call last):
File "./clock.py", line 16, in
set_brightness(0.4)
File "/usr/lib/python2.7/dist-packages/microdotphat/init.py", line 311, in set_brightness
_mat[m_x][0].set_brightness(brightness)
NameError: global name '_mat' is not defined
Obviously, somebody didn't get initialized and to fix this problem one needs to call show() before the set brightness call.
Just pointing this out as something that changed, in case it was unintentional.
-Ben
Currently "clear" does not reset scroll position, causing confusing drawing weirdness. Investigate whether this should happen/what else should happen to the buffer when clearing.
For some use-cases, it will make sense to add 180 degree rotation support.
I will investigate, how mus work this will be and if I can support this.
Attempted to connect one up via wire jumpers instead of just plugging it onto a Pi.
Connected pins 1, 2, 3, 4, 5 & 9, but it's not being detected via i2c-detect. What pins need to be connected?
Following this guide returns...
This hardware is not supported, sorry! Config files have been left untouched
...when running curl https://get.pimoroni.com/microdotphat | bash
Hardware:
Raspberry Pi 4 Model B Rev 1.1
OS:
Raspberry Pi OS
System: 64-bit
Kernel version: 5.10
Debian version: 11 (bullseye)
for_mat
should be format
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.