mpf.platforms.base_serial_communicator
¶
Base class for serial communicator.
-
class
mpf.platforms.base_serial_communicator.
BaseSerialCommunicator
(platform, port: str, baud: int)¶ Basic Serial Communcator for platforms.
Initialise Serial Connection Hardware.
Parameters: - platform (mpf.core.platform.BasePlatform) – the platform
- port –
- baud –
-
readuntil
(separator, min_chars: int = 0)¶ Read until separator.
Parameters: - separator – Read until this separator byte.
- min_chars – Minimum message length before separator
-
send
(msg)¶ Send a message to the remote processor over the serial connection.
Parameters: msg – Byes of the message you want to send.
-
stop
()¶ Stop and shut down this serial connection.