As stated in the previous step, an Arduino Mega 2560 is used for low level signal handling of all of the Multipurpose Mobile Manipulator's actuators and sensors. Setup the Arduino Mega by doing the following:
- Download and install the Arduino IDE from the official Arduino Website.
- Download the Multipurpose Mobile Manipulator Library for Arduino.
- Install it by extracting the MMM folder into the Arduino Libraries folder (this is in C:\Users\User\Documents\Arduino\libraries for Windows).
- Open the Arduino IDE.
- In the Arduino IDE, go to Tools -> Board and select Arduino/Genuino Mega or Mega 2560.
- In the Arduino IDE, go to Tools -> Port and set the serial port to the Arduino Mega 2560's port name.
- Go to File -> Examples -> MMM -> MMM_Mega.
- Upload the sketch.
The Arduino Mega is now ready for low level control of the Multipurpose Mobile Manipulator.
Now, before going on to the high level software control, it is highly recommended to test all of the electrical connections on the perfboard in order to make sure that all of the components for actuation and sensing are sound and ready to use. Do this by uploading and running the following examples on the Arduino Mega:
MMM_Fans: turns the 80 mm computer fans on the robot on and off.
MMM_Wheels: tests the dual DC motor driver by rotating the wheels forward and backward.
MMM_Shoulders: rotates the robot's shoulders left and right.
MMM_Elbows: rotates the robot's elbows up and down.
MMM_Arms: extends the robot's arms forward and backward.
MMM_Grippers: rotates all attached servos on the robot's end effectors.
MMM_Rangefinders: outputs serial data from the ultrasonic rangefinders.
Note that the pins in these example sketches may need to be changed depending on exactly which pins on the Arduino Mega 2560 were used to control the various actuators and sensors.