torsdag den 30. september 2010

Week 5 lab

We were all here this week (Zoi, Carsten and Dan). We worked from
11:15 to 13:30.

** light values:

We used the program from last time that read the normalized light
value (which is the raw light value? (range is 0-1024 according to
API)). The light conditions are just the Zuse building. For
the dark conditions we wrapped a black bag around the sensor.

- in light conditions: white=555, black=370, green=460
- in dark conditions: white=540, black=312, green=415

** carfollower using dark-white:

*** initial program

- on hill: lost track when going over edge. Light sensor gets too
far away from the floor and thinks black and white.
- on track: goes off-track in sharp turns.

*** with proportional

We made it turn less if the light value was close to the average
between the black and white light values. The robot would more easily
stray from the black line in corners and sometimes just on straight
lines.

For next week we could implement a smarter solution that, when the
error gets high enough we could make the other wheel turn in reverse
making the robot turn on its own axis.

*** Finding green

Our experiments with reading light values, we know that green is
between black and white. But in our proportional line follower, that
is the optimal line. We try to overcome this by adding a check to our
main loop that stops the car if a light values close to the green
calibrated value.

Through experiments we ended up with green being defined as the
calibrated value +- 1. And our robot would very often stop on the
black line. Next week we can use a more precise light-value (by using
different API function) to get a more accurate detection.

Ingen kommentarer:

Send en kommentar