The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 3
Class Outline Building the basic Robot structure Programming Robot to go forwards and backwards Using the KIPR Link sans computer.
Building a Simple Chassis Using the Legos provided, construct a small chassis capable of carrying the load of the KIPR Link. Attach motors to chassis. Attach a gear to the motor, as shown on the following page (figure 1). Put a gear and wheel combination on an axle. Align two gears as shown in figure 2.
Figure 1 Attaching Gear/Axle to Chassis
Connecting Motor to Gears Figure 2
Wire Connections From Motors to Handy-Board Figure 3
PROCEDURE 1.Attach the two motors to the connector wires. Next, attach the wire plugs to KIPR Link ports, as shown in Figure 3. 2.Turn the KIPR Link on. 3.Open your Interactive C software. Make sure the computer is talking to the controller. 4.Turn on motors 1 and 3 using the motor(n,x) command. 5.Make motors alternate between a forward and backward direction. 6.You can change the speed of your motors. For example motor(1,100) means motor 1 is turning at 100 or full speed.
Some Sample Robots
Some Sample Robots (cont)
Homework 3 ROBOT 3 1 LIGHT SENSOR 2 CIRCULAR PATH FOR ROBOT TO FOLLOW WHEELS
Homework Pseudo-code program: // initially, robot moves forward (use motor function). // robot continues moving forward until analog sensor 2 indicates darkness (value > 200) // robot then turns right until analog sensor 2 indicates brightness (value < 200) // robot then goes forward again and repeats the process // by going forward then turning and repeating, robot will navigate the circle indefinitely