GithubHelp home page GithubHelp logo

pimoroni / microdot-phat Goto Github PK

View Code? Open in Web Editor NEW
50.0 11.0 15.0 288 KB

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

Python 77.66% Makefile 0.63% Shell 13.37% CSS 1.83% HTML 6.51%
pypi-package

microdot-phat's People

Contributors

2bobo avatar alexellis avatar bertware avatar gadgetoid avatar phuse avatar roguem avatar sandyjmacdonald avatar smashy76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microdot-phat's Issues

Decimal is not Rotated/Mirrored

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.

ValueError: Unsupported char —

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!

set_brightness() behavior change

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

Flip Display 180 degrees

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.

Pinout / schematic request.

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?

Hardware not supported on Pi 4

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.