Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

Project description

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('/dev/ttyUSB0')
>>> 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.

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

Please refer to the online documentation for more information.

Installation

Install carreralib using pip:

pip install carreralib

License

Copyright (c) 2015-2017 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.

Project details


Release history Release notifications

This version
History Node

0.6.0

History Node

0.5.0

History Node

0.4.1

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
carreralib-0.6.0-py2.py3-none-any.whl (13.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Dec 5, 2017
carreralib-0.6.0.tar.gz (41.3 kB) Copy SHA256 hash SHA256 Source None Dec 5, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page