bpod_core.serial.to_bytes
- bpod_core.serial.to_bytes(data)
Convert data to bytestring.
This method extends
serial.to_bytes()
with support for NumPy types, unsigned 8-bit integers, strings (interpreted as utf-8) and iterables.- Parameters:
data (
any
) – Data to be converted to bytestring.- Returns:
Data converted to bytestring.
- Return type: