Home Forums EasyTransfer Library Support Forum Cominications Hub Reply To: Cominications Hub

#1644
Bill
Member

So if I understand correctly, you want to send a packet of commands intended for the arm from the topside Mega to the ROV Mega which relays it to the arm controlling Arduino Uno?

Independent comms over the same serial port in opposite directions is no problem. Just create 2 library objects for each direction of travel, there’s an example of that included in the library. The same goes for multiple serial port, just create separate library objects initialized for different ports. You can get tricky if two serial ports are always going to deal with the same set of data and initialize the library objects with the same struct.

However the limitation is the library only handles one library object per direction of a serial port. So commands for the ROV mega and for the UNO arm must be in the same struct sent from the topside Mega. You could simple retransmit that struct with all commands to the Uno from another serial port on the ROV Mega and code the Uno to only deal with data in the struct that deals with the Arm. It would waste a little bit of RAM but not any CPU cycles.

Make sense?