A python package that implements the protocol for programming Luxbeam DMD controller from VISITECH.
Project description
Luxbeam Introduction
Luxbeam
is a python package that implements the protocol for programming Luxbeam DMD controller from VISITECH.
The Luxbeam
class implements the control protocol of Luxbeam digital micro-mirror device (DMD) controller.
This is tested with Luxbeam 4600 controller and DLP9500UV DMD.
In addition to equipment control from the Luxbeam
class, the LuxbeamSeqeuncer
class implements the support for composing sequencer code used in Luxbeam controller.
This allows the user to compose the sequencer code using native python arithmetic operations and some of the flow controls.
Installation
One can install the package via setuptools:
python setup.py install
To install the package in develop mode instead, use:
python setup.py develop
Test
It is recommended to run the test cases to ensure LuxBeam
is compatiable with your setup.
Run the tests in the test folder:
pytest test --ip="<IP address>"
Run the interactive tests:
pytest test --ip="<IP address>" --interactive -s
Example
import Luxbeam
from Luxbeam.sample import number_image
# This is the equivalent example of displaying non-scrolling images in the LB 4600 user guide.
# Connect to the Luxbeam
luxbeam = Luxbeam.Luxbeam("192.168.0.10", timeout=1) # modify the ip address if required.
# Prepare the image (display 123 on the DMD)
image = number_image(123, luxbeam.cols, luxbeam.rows)
# Set image type to 1 (binary). (One-time Operation)
luxbeam.set_image_type(1)
# Set inum size to 1080. (One-time Operation)
luxbeam.set_inum_size(luxbeam.rows)
# Disable the sequencer.
luxbeam.set_sequencer_state(Luxbeam.SEQ_CMD_RUN, Luxbeam.DISABLE)
# Set sequencer in reset-state
luxbeam.set_sequencer_state(Luxbeam.SEQ_CMD_RESET, Luxbeam.ENABLE)
# Load the image to inum = 0.
luxbeam.load_image(0, image)
# Compose the sequencer file.
seq = Luxbeam.LuxbeamSequencer()
for _ in seq.jump_loop_iter(): # A while-true loop
seq.load_global(0, 400) # Load data from Inum (0) to DMD
seq.trig(Luxbeam.TRIG_MODE_NEGATIVE_EDGE, Luxbeam.TRIG_SOURCE_INTERNAL, 0) # Neg. edge internal trigger
seq.reset_global(40) # Display contents on DMD
# View the generated sequence file
print(seq.dumps())
# Send sequence file.
luxbeam.load_sequence(seq.dumps())
# Take sequencer out of reset-state
luxbeam.set_sequencer_state(Luxbeam.SEQ_CMD_RESET, Luxbeam.DISABLE)
# Start the sequencer
luxbeam.set_sequencer_state(Luxbeam.SEQ_CMD_RUN, Luxbeam.ENABLE)
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
File details
Details for the file Luxbeam-0.1.1.tar.gz
.
File metadata
- Download URL: Luxbeam-0.1.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48007b6449b9ca6d415625f93f151bbf0fed5afbac61a80d6bd6702a2b3a0a91 |
|
MD5 | 9c82f3a8b2c4710580ca93a3913edee9 |
|
BLAKE2b-256 | c6eb2d613860517c6cf38f491c6906221c3b34a7414282be8e9f30cf376298a5 |
File details
Details for the file Luxbeam-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: Luxbeam-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54a9e09d04ae3313abed93801f8f3d2bc4ddc8851d0c245b064134fa6941cf3e |
|
MD5 | f49fb915d33424d7bb55681e56d3c384 |
|
BLAKE2b-256 | b70354979789e1875616e5fa1fd681f9c2edb5abd2816790b36f92ec30138b04 |