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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b63f027d3195538043e0bfd58faf5fcc5d46e77a7ba0e966a6f729f31449d3
|
|
| MD5 |
f795c58d3d73c1e1a32878766d92c643
|
|
| BLAKE2b-256 |
f085e1572914f9d15c4551ee28ff633faa8bacf20947940fe7e61801a3db6fc5
|
Provenance
The following attestation bundles were made for alphasignpy-0.1.1.tar.gz:
Publisher:
publish.yml on lancereinsmith/alphasignpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphasignpy-0.1.1.tar.gz -
Subject digest:
37b63f027d3195538043e0bfd58faf5fcc5d46e77a7ba0e966a6f729f31449d3 - Sigstore transparency entry: 1237264708
- Sigstore integration time:
-
Permalink:
lancereinsmith/alphasignpy@8dfdf83bcf59d8369fc904769514913d1ea55402 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lancereinsmith
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8dfdf83bcf59d8369fc904769514913d1ea55402 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c96b17551084e14c535665cd67cad900332969d26eabba8f932c1ebef204096
|
|
| MD5 |
2ddb421f49576c99ef9d3f0577f063f7
|
|
| BLAKE2b-256 |
9074abff13c1047872c568983c49fb4a68e2813ce54a721047dbfef242901811
|
Provenance
The following attestation bundles were made for alphasignpy-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on lancereinsmith/alphasignpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphasignpy-0.1.1-py3-none-any.whl -
Subject digest:
7c96b17551084e14c535665cd67cad900332969d26eabba8f932c1ebef204096 - Sigstore transparency entry: 1237264711
- Sigstore integration time:
-
Permalink:
lancereinsmith/alphasignpy@8dfdf83bcf59d8369fc904769514913d1ea55402 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lancereinsmith
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8dfdf83bcf59d8369fc904769514913d1ea55402 -
Trigger Event:
push
-
Statement type: