Robotic Arm 6DOF arduino uno with OpenMV

Hello there, i would like to assembly a robotic arm with 6 servos that can do the pick and place process and based on color separate them using the OpenMV M4 for a project but im a bit confused after reading some posts.
I would like to set Arduino as slave and OpenMV as master (SPI Connection) so it can send the processed data to adruino and afterwards arduino moving the servos.
I tried to find code in the path (https://github.com/openmv/openmv/tree/master/usr/examples/02-Board-Control) but i cant see the Master OpenMV Slave Arduino code is it possible to find it and last thing openMV can sending images or coordinates so Arduino can work with it.

Everyones help appreciated… Thanks everyone for his time…

Hi, please just use async serial messages to communicate between the OpenMV Cam and an Arduino Mega. The Arduino cannot act as a SPI or I2C slave and the OpenMV Cam is not great at being an I2C or SPI slave. The easiest and most reliable way to hook things up is to have the OpenMV Cam and the Arduino talk serial messages to each other. If you’d like to see example code on how to do this check out the Examples → Pixy Emulation → UART scripts.

Not sure why you would say that Arduino can’t be an I2C slave.

I’ve written AVR I2C slaves in the past (admittedly not using Arduino) and they worked quite well. I can point anybody that’s interested to my code (which also includes an i2c bootloader). However, even with that, I’d still probably use serial, just because its a simpler way to go, and you can easily get megabit serial on both the AVR and under MicroPython.

Oh, the default Arduino library doesn’t support I2C or SPI as a slave.

As for the OpenMV Cam. It’s just a giant pain to synchronize the devices if it’s a slave since you generally want it processing images or something versus waiting for I2C. That said, I2C is possible as long as you have a protocol where the camera can not respond and the Arduino keeps retrying. SPI is nigh impossible however without an additional chip select line or something to sync the devices first before the transaction.