I´ve got several micropython boards that want to interconnect with serial link.
I´m wondering if there is a way to pass objects and data between them or if this idea is an heresy... thoughts ?
Communication between micropython boards
Re: Communication between micropython boards
Sure. There are many ways of doing this, it really depends on the specifics of the type of data you want to pass.
For example, I wrote some code which sends data over a serial link using JSON: https://github.com/dhylands/json-ipc
That code actually sends arbitrary packets up to 64K in length, and they just happen to contain JSON strings. They could just as easily contain binary data. You'd have to modify the last call to json.dumps (in the send function) and the call to json.loads in the process_byte function to use arbitrary data rather than json strings.
The bioloid servos allow multiple devices to be connected to the same serial bus, and each device has a different ID. This code works by using the half duplex feature of the STM32. Basically this causes the receiver to be disabled while sending, and otherwise has the receiver enabled. This particular method works best if there is a single master that sends commands to multiple slaves (so that multiple slaves aren't trying to send at the same time).
You could also use the CAN bus.
For example, I wrote some code which sends data over a serial link using JSON: https://github.com/dhylands/json-ipc
That code actually sends arbitrary packets up to 64K in length, and they just happen to contain JSON strings. They could just as easily contain binary data. You'd have to modify the last call to json.dumps (in the send function) and the call to json.loads in the process_byte function to use arbitrary data rather than json strings.
The bioloid servos allow multiple devices to be connected to the same serial bus, and each device has a different ID. This code works by using the half duplex feature of the STM32. Basically this causes the receiver to be disabled while sending, and otherwise has the receiver enabled. This particular method works best if there is a single master that sends commands to multiple slaves (so that multiple slaves aren't trying to send at the same time).
You could also use the CAN bus.