I am trying to build an system that consist of RPI & camera to detect Object based color , according to that to track this object with my homemade robot car with Arduino running motors.
Image Processing - Okay
Multiple functions on Ardunio to run the motors with Slightly/Medium/Extreme turns to each side - Okay
My problem is with communicate two of them together (i searched already lot in the internet, but i am still confuse) .
I want to communicate the RPI with the Arduino like that the RPI can said (go to function A) , then the Arduino does it and after this (go to function B) etc.
Somone can guide me or giving me a general direction to what i need to do ?
You'll need level shifters and to decide on which communication protocol you want to use; such as SPI, I2C, or Serial. When you have decided on the communications protocol then you've selected a direction to go.
I did a project like this ten years ago using OpenCV for image processing and serial comm to instruct an Arduino to move a servo (to follow a tracked color)
Serial is probably the easiest to implement as far as talking to an Arduino. You can just send single byte (or single characters) to tell the Arduino what to do. You'll have access to 255 different commands if that is the case