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 a serial (cable) connection.
>>> 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 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
carreralib is available from PyPI and can be installed by running:
pip install carreralib
Project Resources
License
Copyright (c) 2015-2022 Thomas Kemmer.
Licensed under the MIT License.
Carrera is a registered trademark of Carrera Toys GmbH.
Thanks to Stephan Heß (a.k.a. slotbaer) for doing all the hard work.
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
Hashes for carreralib-0.9.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b482e2b446d27be760b8f75d7b616097b87d485e8eff16dd86a06f658561984 |
|
MD5 | d4e9b352f9fac94a3451792287f889c2 |
|
BLAKE2b-256 | 72a9d9ac631c499f274122f3c70420cc1c10f36be3dbef3f28edf87fd7f0bbbc |