Skip to main content

The ledgrid module contains a single LEDGrid class which aims to be as identical as possible to the public interface of the Raspberry Pi Sense HAT library, such that it is useful in mocking up software for it and other such devices.

https://raw.githubusercontent.com/zeth/ledgrid/master/ledgrid-screenshot.png

Many existing Sense HAT LED demos and software will work using the following import statement:

from ledgrid import LEDGrid as SenseHat

However, the internal implementation is rather simplified and uses pygame instead of the hardware HAT.

It requires pygame to be installed (not currently available through pypi), an additional optional dependency is PIL (i.e. Pillow) which is required by some features (notably scrolling text with the show_message method).

It supports every Python version since 2.7. It is contained in only one Python file, so it can be easily copied into your project if you don’t want to use pypi. (The copyright and license notice must be retained.)

At the bottom of the ledgrid.py file are some examples of usage. You can run these examples using:

python3 -m ledgrid

Or if you have the file locally:

python3 ledgrid.py

Many thanks to Richard Hayler. The LED class, graphics, etc are based on his 8x8GridDraw.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ledgrid-0.2.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file ledgrid-0.2.tar.gz.

File metadata

  • Download URL: ledgrid-0.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ledgrid-0.2.tar.gz
Algorithm Hash digest
SHA256 f98f5b355f5ad651f96b40a8ef9a39d827778dad91913887f337e4f33f852384
MD5 37c6d43129e32e8eb3d33c71a5840665
BLAKE2b-256 9d12d4e9b8a603a24faa9b85cb03aa89593ac2fd3022464016979c605b793f88

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4

1 file

0.3

1 file

This release

0.2 This release

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page