Hi
As far as I know ( based on my previous experience )
- First, you need to create a CAD model of the robot.
- Create URDF of the model.
- In your ROS (Raspberry Pi) open Moveit and upload the urdf.
- Define all the joints and necessary things in moveit and create the moveit configuration file.
- Now roslaunch this configuration file (demo.launch usually) which opens your model in Rviz.
- Rviz will be publishing the joint angles to the jointstates topic.
- In your hardware microcontroller (eg. Arduino if you are using ) write a node to subscribe to this jointstates topic.
- All the computation will be done by ros and the final commands are given to the arm (hardware).
- You can see your arm moving to the desired position as seen in Rviz simulation.
I hope you got a rough idea of the entire procedure.