skip to navigation
skip to content

carreralib 0.2.0

Python interface to Carrera(R) DIGITAL 124/132 slotcar systems

Package Documentation

Latest Version: 0.4.1

This module provides a Python interface to Carrera(R) DIGITAL 124/132 slotcar systems connected via serial port or Bluetooth.

>>> from carreralib import ControlUnit
>>> cu = ControlUnit('D4:8B:C6:FC:D8:07')
>>> cu.version()
b'5331'
>>> cu.request()
Status(fuel=(15, 15, 15, 15, 15, 15, 0, 0), start=0, mode=6,
       pit=(False, False, False, False, False, False, False, False),
       display=8)
>>> cu.start()
>>> cu.request()
Status(fuel=(15, 15, 15, 15, 15, 15, 0, 0), start=1, mode=6,
       pit=(False, False, False, False, False, False, False, False),
       display=8)
>>> cu.start()
>>> cu.request()
Timer(address=1, timestamp=243019, sector=1)
>>> cu.request()
Timer(address=0, timestamp=245704, sector=1)

For Bluetooth access you will need the Carrera AppConnect(R) adapter, a Bluetooth Low Energy compatible device, and bluepy installed, which is only available for Linux. A serial connection should work on all platforms supported by pySerial.

Installation

Install carreralib using pip:

pip install carreralib

Demo RMS

For demonstration purposes, the carreralib module can also be used from the command line as a simple race management system (RMS).

License

Copyright (c) 2015 Thomas Kemmer.

Licensed under the MIT License.

Carrera and Carrera AppConnect are registered trademarks of Stadlbauer Marketing + Vertrieb GmbH.

Thanks to Stephan Heß (a.k.a. slotbaer) for doing all the hard work.

 
File Type Py Version Uploaded on Size
carreralib-0.2.0-py2.py3-none-any.whl (md5) Python Wheel 2.7 2015-07-17 12KB
carreralib-0.2.0.tar.gz (md5) Source 2015-07-17 10KB