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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 928926d8f0711d342f0f4deb35377cce6665e29b2dba1577eec795fc4efa4acf |
|
MD5 | fa2fa13151285004e8a84de6494c21a1 |
|
BLAKE2b-256 | a4c58a4a52af4dcd43d0b3c9acfeff6ac90b58fa4f4ce7aa59b47b1a82d0dc0a |