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.1.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.1-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alphasignpy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 37b63f027d3195538043e0bfd58faf5fcc5d46e77a7ba0e966a6f729f31449d3
MD5 f795c58d3d73c1e1a32878766d92c643
BLAKE2b-256 f085e1572914f9d15c4551ee28ff633faa8bacf20947940fe7e61801a3db6fc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for alphasignpy-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: alphasignpy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c96b17551084e14c535665cd67cad900332969d26eabba8f932c1ebef204096
MD5 2ddb421f49576c99ef9d3f0577f063f7
BLAKE2b-256 9074abff13c1047872c568983c49fb4a68e2813ce54a721047dbfef242901811

See more details on using hashes here.

Provenance

The following attestation bundles were made for alphasignpy-0.1.1-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