Robotic Arm 6DOF arduino uno with OpenMV

General discussion about topics related to OpenMV.
madstelios
Posts: 1
Joined: Wed May 23, 2018 5:46 am

Robotic Arm 6DOF arduino uno with OpenMV

Postby madstelios » Wed May 23, 2018 6:35 am

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/m ... rd-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..
User avatar
kwagyeman
Posts: 2118
Joined: Sun May 24, 2015 2:10 pm

Re: Robotic Arm 6DOF arduino uno with OpenMV

Postby kwagyeman » Wed May 23, 2018 8:38 pm

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.
Nyamekye,
User avatar
dhylands
Posts: 33
Joined: Sun May 31, 2015 1:27 pm
Location: Shuswap, BC, Canada
Contact:

Re: Robotic Arm 6DOF arduino uno with OpenMV

Postby dhylands » Thu May 24, 2018 1:47 pm

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.
User avatar
kwagyeman
Posts: 2118
Joined: Sun May 24, 2015 2:10 pm

Re: Robotic Arm 6DOF arduino uno with OpenMV

Postby kwagyeman » Thu May 24, 2018 2:12 pm

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.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests