Skip to content

Frangitron/python-arduino-serial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Arduino Serial

/!\ 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

Kivy on Android

If usb4a and usbserial4a are present, they will be used as the USB Serial backend, otherwise pyserial is used

Usage

  • Data serialization examples can be found in the tests
  • Header generation example can be found in the tests

Protocol

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)

TODO

  • Deal with byte alignment and place 'x's in struct format
  • Nested structure support for CHeaderExporter

About

Bidirectionnal serial communication (C Structs and Python Dataclasses) between Python and Arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published