/!\ BETA VERSION
Bidirectionnal serial communication (C Structs and Python Dataclasses) between Python and Arduino
- declare type hinted Dataclasses in Python
- generate C Header files
- send and receive data from both Python and Arduino through serial communication
Meant to be used with Arduino Python Serial
If usb4a
and usbserial4a
are present, they will be used as the USB Serial backend, otherwise pyserial
is used
- Data serialization examples can be found in the tests
- Header generation example can be found in the tests
Message topology (bytes)
0 | 1 | 2 | n | n + 3 |
---|---|---|---|---|
begin | direction | data type | data | end |
------- | header | header | data | ------- |
note data is omitted when sending a reception request (only data type is sent)
- Deal with byte alignment and place 'x's in struct format
- Nested structure support for CHeaderExporter