Skip to content

mcci-usb/model2450lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

model2450lib

Python library to control the MCCI Model 2450 Brightness And Color Kit (BACK).

Provides APIs for device discovery, serial communication, sensor data acquisition,color calibration, streaming, and blank frame detection.

Install Python3.14 (64-bit) package

install python package from python.org

Install pip package

pip --version
python -m pip install --upgrade pip

Prerequisites for running or building

On Windows:

Development environment

  • OS - Windows 10 and 11 64 bit
  • Python - 3.14.3
  • pyserial - 3.5

On Linux:

Development environment

  • Ubuntu OS - 24.04
  • Python - 3.14.3
  • pyserial - 3.5

On Macos:

Development environment

  • Mac OS Montery - 12.7.6
  • Python - 3.14.3
  • pyserial - 3.5
pip install pyserial

Installing Python Packages with Setup.py

  1. Clone the repository from github

  2. Open a terminal window and change directory to {path_to_repository}/model2450lib. using cd into the root directory where setup.py is located

  3. To install the library in your local Python

setup, enter the command

pip install .

Please navigate to dist/ directory and you will find the files .egg file. Example: model2450lib-2.1.0-py3.7.egg

How to use the package

Create a Python file and import the class library from package:

from model2450lib import searchmodel
from model2450lib import model2450
import time

Listed out the Model2450

dev_list = searchmodel.get_models()

Open comport

Replace 'COM3' with the appropriate COM port for Model2450

sw1 = model2450.Model2450('COM3')

Connect the USB Model

  • Conect the model 2450 device
sw1.connect()

Read Color Sensor

  • Retrieve RGB color values from the BH1749 color sensor.
sw1.get_color()

Read Light Level

  • Get the configured blank frame detection threshold.
sw1.get_level()

Read Ambient Light

  • Fetch the device serial number stored in EEPROM.
sw1.get_read()

Get Firmware & Hardware Version

  • Displays firmware and hardware version (Format F:H)

sw1.get_version()

Set Blank Frame Level

# Example (120)
sw1.set_level(120) 

Calibrate red

  • This command calibrates the red color.
sw1.set_red()

Calibrate Green

  • This command calibrates the green color.
sw1.set_green()

Calibrate Blue

  • This command calibrates the blue color
sw1.set_blue()

Read Serial Number

  • Read Serial number.
sw1.read_sn()

Release History.

  • v2.1.0 Adding Headers
  • v2.0.0 Adding Packetazation Format decoding
  • v1.0.2 adding decoding packetaizaton
  • v1.0.1 update examples
  • v1.0.0 initial release

About

Model 2450 Brightness and Color Kit Control APIs

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages