Procedures


                                                                         Procedures

A. Building the frame of the robot

1. Attach two chassis rails to two other chassis rails to form a rectangular base
2. Bolt two 2.5” x 7.5” panels to the base of the robot
3. Screw four 3/8” partially threaded beams to two chassis rails on opposing sides three holes in towards the center
4. Attach one chassis bumper to the top of two of the 3/8” threaded rods with the vertical segment facing outwards
5. On the front of the robot, attach two 3/8” partially threaded beams to the bottom of the chassis rail four holes in on either side
6. Attach two more 3/8” partially threaded beams to the front chassis rail six holes in on either side in the top row of holes
7. Bolt two long bars to the partially threaded beams on the front chassis rail so that they are six holes away from the edge of the rail on either side
8. Attach a chassis bumper to one of the upright chassis bumpers
9. Screw two 3/8” partially threaded beams to the rear of the robot five holes in on the top row of holes

 B. Assembling the tank treads

1. Begin with a 2.5” x 7.5” panel
2. Place two axles one hole up and one hole over on both ends of the plate
3. Screw two bogie wheel assemblies onto the plate two holes toward the center  from the axles on each side
4. Attach a tensioner bogie to the plate so that it is flush with the right bogie wheel assembly
5. Mount one drive wheel on each axle
6. Adjust the tank treads to 47 links long and attach them around the wheel assembly
7. Repeat for the other set of treads
8. Mounting and bracing the tank treads
9. Attach one tank tread to each side of the base parallel to the chassis bumpers
10. Screw the panel in the top corners to the corresponding rail hole using the 2” partially threaded beams
11. Attach a chassis rail on the axles so that it rests flush with the protruding long bar
12. Repeat for the other side

  C. Attaching the other sensors and modules

1. Screw the RF receiver module onto the upright chassis bumper that does not have the chassis rail attached to it
2. Attach the micro controller module onto the base plate of the structure along the edge with the long bars
3. Attach the bumper switches to the 3/8” partially threaded beams on either side of the robot
4. Screw in one motor for each tread assembly as per the instructions in the manual
5. Screw the light sensor onto the upright chassis rail six holes in
6. Rest the battery in between the tank tread assembly and the chassis bumper with chassis rail attached

D. Plugging in the modules

1. Plug in the motors to ports 1 and 2 in the motor section of the micro controller
2. Plug the battery into its port on the side of the micro controller
3. Plug the bumpers into ports 2 and 3 of the section marked “Analog/Digital”
4. Plug in the RF receiver module to the port marked  “RX 1”
5. Plug the light sensor into port 1 of the “Analog/Digital” section

E. Programming the robot

1. Open up a new EasyC program
2. Select “Pro” from the toolbar
3. Double click on the “Variables” box
4. Define a variable with the type “int”, name “loop”, and a value of 1
5. Define a variable with the type “int”, name “bumper2”, and no value
6. Define a variable with the type “int”, name “bumper3”, and no value
7. Define a variable with the type “int”, name “light”, and no value
8. Close the variables window
9. Drag a “While” loop from the program flow window
10. Double click the “While” loop function block, and define the variable as “loop==1” and close the window
11. Drag a light sensor block from the “Inputs” menu into the “While” loop
12. Double click on the light sensor, and define analog input # as “1” and retrieve to “light”
13. Drag a “Print to screen” block from the program flow menu to the “While” loop under the light sensor  icon
14. Define the Print to Screen block with the message being “lightsensor==”, a variable of “light”, a directive of “%d”, and a type-cast of “int”
15. Drag a “Bumper Switch” icon from the input menu, place it under the Print to Screen icon, and define digital input as “2” and retrieve to “bumper2”
16. Drag a “Bumper Switch” icon from the input menu, place it under the bumper2 icon, and define digital input as “3” and retrieve to “bumper3”
17. Drag an “If” statement from the program flow menu, place it under the bumper3 icon, and make the expression “if (bumper2==0)
18. Drag a “Tank- 2 motor” control from the RC Control menu. Place this in the “If” statement. Set RX #= 0, left channel to 2, right channel to 3, left motor to 1, and right motor to 2
19. Drag an “Else” loop from the program flow menu and place it below the “If” menu
20. From under the “Outputs” menu, drag two motor modules into the “Else” loop. Set one module to motor number 1 and counter-clockwise. Change the other motor module’s settings to motor number 2 and clockwise
21. Drag two “Wait” blocks from the program flow menu to under the motor modules. Set the top ones value to “1000”, and the bottom ones to “500”
22. Place two new motor modules in between the two wait blocks, both with a counter-clockwise value
23. Testing the robot and reading the sensors
24. Make a 12 foot square on the ground. Mark the boundaries with raised edges
25. Make a grid in the square with lines every foot
26. Move the robot in a straight line from the light source, taking readings every foot
27. With painters tape, mark a line every 6” to form a grid
28. Place 3 light sources 6’ in towards the center of the grid, with two from corners and one from the wall opposite the corners
29. Place the robot in the center. Begin the program
30. Have the robot take a light reading to triangulate it’s location.