I’d like to power a neotrellis M4 via a plasma2040, and then send messages via SDA (from the neotrellis to the plasma)
But I am not sure what cable i need. Grove? Stemma? Adafruit stemma? Adafruit stemma to pin header?
I also need to know what direction the power goes in, to make sure that I am powering the neotrellis from the Plasma2040 and not vice versa. How would I do that?
The connector on the NeoTrellis is 4 pin JST PH (2mm spacing). The connector on the Plasma is 4 pin JST SH (1mm pitch). There are adapter cables available, but they are hard to get since Adafruit practically abandoned Stemma in favor of Stemma/Qt. 4 pin JST SH with blank wires on the other side are available from various sources and crimping JST PH is doable.
BTW: Stemma and Grove are not mechanically compatible. Even if Adafruit claims the opposite. If you use your knife and cut off enough of the plugs, they will fit and work, but I would not call this to be compatible.
From software-side, it is more complicated. You would have to convince one side to be an I2C master. The NeoTrellis could also do UART, but I’m not sure about the Plasma.
Powering will only be a problem if you supply power to both boards.
I am currently working on this. I have connected both devices and I am running i2c.scan() on the plasma2040.
The bad news is that I am getting no response, no devices are found.
The good news is that when I disconnect the cables, I get an error message: “TimeoutError: Clock stretch too long”.
You have two microcontrollers (M4 in the neotrellis and RP2040 in the plasma). When scanning from the plasma, the plasma is the host (master) and it will only find the M4 if it implements the I2C device.
Well, you can probably turn one of these MCUs to a device. I have seen code, but never tried myself. Something like this pops up every once in a while and it would be an interesting challenge.