moving so fast he misses it!
• Eddie goes backwards when I told him to go
forwards.
- Remember that you have a gear train. This means
that telling Eddie’s motor to spin forward results in
him rolling backwards, and vice versa!
• Eddie turns the wrong direction when he reaches the
line.
- First check to make sure that your left light sensor
is connected to port 1, and your right sensor is
connected to port 2.
- If that doesn’t work, check your programming.
You want to associate sensor 1 with motor B and
sensor 2 with motor C.
Experiment!
Now that you understand the basics, do some
experimentation! Here are some ideas:
• Find another way to write a program with the exact
same output — Eddie follows the line with one sensor
on either side.
Wrapping Up
This time, we programmed Eddie to follow a line using
multiple light sensors which makes for much smoother, more
accurate line following than using just one sensor. We also
learned a bit about programming logic, and using switches
to check whether something has happened (in this case,
checking to see whether Eddie is on or off the line!).
Next time, we’ll be doing something entirely different
with the light sensors. Using two light sensors facing-up,
we’ll be writing a program that
uses dynamic variables to drive
Eddie towards the brightest
[or darkest] point in a
room. Stay tuned! SV
STEER WINNING ROBOTS
WITHOUT SERVOS!
Perform proportional speed, direction, and steering with only two Radio/Control channels for vehicles using two
separate brush-type electric motors mounted right and left
with our mixing RDFR dual speed control. Used in many
successful competitive robots. Single joystick operation: up
goes straight ahead, down is reverse. Pure right or left twirls
vehicle as motors turn opposite directions. In between stick
positions completely proportional. Plugs in like a servo to
your Futaba, JR, Hitec, or similar radio. Compatible with gyro
steering stabilization. Various volt and amp sizes available.
The RDFR47E 55V 75A per motor unit pictured above.
www.vantec.com
Order at
(888) 929-5055
SERVO 11.2010 41