I am currently working on a SWARM mobile robots project and I am trying to select a suitable micro controller.
On each robot, I have 2 DC Motors, 3 Ultrasonic HC-SR04 sensors, 1 MPU-9250 IMU Module and 1 GPS module.
The controller will be required to interface with all these sensors, gather data, and send them through an I2C bus to a Raspberry Pi 3 Model B, which will be then used to use these data in developed algorithms, and then these algorithms will send back signals to the controller to drive the robot in a certain direction.
A PID control code should be for the DC motors to drive the robot in a straight line or to a certain direction - if needed -.
So, in summary, the controller here is responsible for gathering all data from all these sensors and drive the DC motors to move the robot.
I was a bit unsure of what micro controller would be suitable, and I found the Arduino Mega to be promising as it has plenty of I/O, PWM, and interrupt pins. I was unsure though if all these computations done would slow it down that I may need to get another controller.
So, is the Arduino Mega a suitable option for such a project or no?
N.B: If you need any more details to be able to give a better opinion, just leave them in the comments and I'll reply with what's needed.