Skip to main content

Comprehensive Python implementation of the Alpha Sign Communications Protocol for LED signs

Project description

alphasignpy

A comprehensive, modern Python library for controlling Alpha Sign LED displays over serial.

Full implementation of the Alpha Sign Communications Protocol (M-Protocol).

Original library by prototux. Rewritten and extended by Lance Reinsmith.


Documentation

Full API documentation is available at https://lancereinsmith.github.io/alphasignpy/


Features

  • Comprehensive protocol coverage — Write/Read TEXT, STRING, SMALL/LARGE/RGB DOTS, SPECIAL FUNCTIONS, ALPHAVISION BULLETIN
  • ACK/NAK error checking with full exception hierarchy
  • DTR control to prevent accidental sign resets
  • Image conversion from any RGB image to the 9-colour sign palette
  • Text formatting helpers — colours, fonts, speed, date/time, animation, counters

Installation

pip install alphasignpy

Quick Start

from alphasign import Sign, Packet, SignType
from alphasign.commands import WriteText, WriteSpecialFunction
from alphasign.protocol import DisplayMode, Color, FileType
from alphasign.text_format import color

# Open connection
sign = Sign(sign_type=SignType.ALPHA_2X0C, address="01")
sign.open("/dev/ttyUSB0", dtr=False)

# Configure memory (one-time setup)
pkt = Packet(type_code=sign.type_code, address=sign.address)
pkt.add(WriteSpecialFunction.configure_memory([
    {"label": "A", "type": FileType.TEXT, "size": 256},
]))
sign.send(pkt)

# Send a coloured message
pkt = Packet(type_code=sign.type_code, address=sign.address)
pkt.add(WriteText(
    color(Color.RED) + b"Hello " + color(Color.GREEN) + b"World!",
    label="A",
    mode=DisplayMode.ROTATE,
))
sign.send(pkt)

sign.close()

Protocol Notes

  • Serial framing: 9600 baud, 7E1 (7 data bits, even parity, 1 stop bit)
  • Uses binary framing (not ASCII Printable format)
  • Timing markers (0xFF) are used to insert 100 ms delays; never transmitted
  • Checksums are 16-bit hex sums from STX through ETX

License

MIT License. See LICENSE and NOTICE for details. The original library by prototux was released under the Apache License 2.0.

Project details


Download files

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

Source Distribution

alphasignpy-0.1.0.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphasignpy-0.1.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file alphasignpy-0.1.0.tar.gz.

File metadata

  • Download URL: alphasignpy-0.1.0.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alphasignpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 914e2344d77cff0dec5f86aad2819b55f587f43054397848eabd1d2edac5936e
MD5 1f18de8d51c1999a4970e7b63a8107f6
BLAKE2b-256 7a78f9f2438afff3c5ebda17ecbdd2a05a7ea4c30d1a9b574279451d37514f89

See more details on using hashes here.

Provenance

The following attestation bundles were made for alphasignpy-0.1.0.tar.gz:

Publisher: publish.yml on lancereinsmith/alphasignpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alphasignpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: alphasignpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alphasignpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e27b4fc9af741981d6a7452abea4f058ebec6669698d2c1e581f23b9a0ec2dc6
MD5 5d6b03d77f9852ee4f41fbae5c0aa125
BLAKE2b-256 a280005eb860b775802a66b6f21fc1bb4a0bdedb766ed4c28af48b30202e6dae

See more details on using hashes here.

Provenance

The following attestation bundles were made for alphasignpy-0.1.0-py3-none-any.whl:

Publisher: publish.yml on lancereinsmith/alphasignpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page