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 python package from python.org
pip --version
python -m pip install --upgrade pipOn 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-
Clone the repository from github
-
Open a terminal window and change directory to
{path_to_repository}/model2450lib. usingcdinto the root directory where setup.py is located -
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
Create a Python file and import the class library from package:
from model2450lib import searchmodel
from model2450lib import model2450
import timedev_list = searchmodel.get_models()
Replace 'COM3' with the appropriate COM port for Model2450
sw1 = model2450.Model2450('COM3')
- Conect the model 2450 device
sw1.connect()
- Retrieve RGB color values from the BH1749 color sensor.
sw1.get_color()
- Get the configured blank frame detection threshold.
sw1.get_level()
- Fetch the device serial number stored in EEPROM.
sw1.get_read()
- Displays firmware and hardware version (Format F:H)
sw1.get_version()
# Example (120)
sw1.set_level(120)
- This command calibrates the red color.
sw1.set_red()
- This command calibrates the green color.
sw1.set_green()
- This command calibrates the blue color
sw1.set_blue()
- Read Serial number.
sw1.read_sn()
- 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