First we will start by testing the limit switches, and ensure they are plugged in and operating properly.
Open the Arduino IDE, which is the light blue/green icon in the shortcut menu. Go to open → recent files and open the file called SwitchTest. You screen should look like this
Ensure you have the right board and port selected (Mega 2560), and then click the upload button. Open the serial monitor (magnifying glass icon in the top left). You should then see streaming data from the device. Click on each limit switch and you should see them clicking from 0 to 1 on your serial monitor output.
You will now test the motors to ensure everything is wired correctly.
WARNING, THINGS ARE ABOUT TO MOVE.
Once this next sketch is loaded, the motors will start to move as soon as the board is powered.
Go back to the Arduino IDE and open the MotorTest sketch. Upload this to the board.
Next, place your robot in a neutral position, and plug in the power port. You should see each axis rotate back and forth about 20 degrees.
Next, try playing with the axis_1_move_dist, axis_2_move_dist and axis_3_move dist on lines 24-26. Change these values by a small amount, re-upload and see the change.
Finally, open and upload the TeleopWithHoming sketch. We will use this in our next section with ROS.