Swtich Master and Slave code in Arduino code

I have two Arduino uno. I use Modbus.h library. I want to use one arduino to work as master and slave mode. Is this possible?

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

If the library supports both modes, it's up to your code to make the distinction, I expect. But that will depend upon the library capabilities. I wouldn't expect to be able to be both within the same instance, by the way.

Why do you need to do this , I could see confusion on the bus as I’d assume another Arduino would have to take over as a master ?
Canbus is a multi master type bus , so normally doesn’t have a master /slave relationship on the bus

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.