Has anyone used an Arduino (Uno in this case) in conjunction with a separate uStepper controller (which itself emulates an Arduino). The problem is that the uStepper seems to insist on being an I2C master, but that role is already taken by the Uno (and there are already other slaves on there). Ultimately, I may wish to use 2 or more uSteppers, but they can't all be I2C masters. Or can they? Maybe I'll have to dig into the uStepper code and see if that can be hacked, but somehow I doubt it.
Initially the I2C was not intended to be a multimaster bus. AS you know the master drives the clock so as soon as the second comes on the data is trashed. You could place some RAM or FRAM so each can access it. Since the uStepper controller emulates an Arduino It could read the data in the memory but I doubt you have enough control to implement this. A preliminary schematic would be helpful. There are I2C multiplexers that might solve the problem. There are other ways also, look at this link: Arduino master-slave control using I2C protocol | by Purushotam Kumar | Medium
µStepper: https://www.ustepper.com/
Does it take commands via the serial port ? Then you should use that. The I2C bus is not good for communication between processors.
@gilshultz that link is to a single Arduino board as Master and the others as Slaves. There is nothing special about that.
Thanks for the responses. It has given me a couple of ideas to look into. The intermediate RAM is a possibility, as is serial comms. Ultimately, (unless I ditch the uStepper) I will want to send information to at least 2 units. The data flow is very small (just a byte at a time), so putting it in RAM and reading back later may work. Another possibility could be simple digital i/o, though I'd need to expand the number of pins.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.