Skip to main content

An 8x8 grid of virtual LEDs implemented in Pygame.

Project description

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.

Project details


Release history Release notifications

This version
History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ledgrid-0.4.tar.gz (10.3 kB) Copy SHA256 hash SHA256 Source None Dec 25, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page