Duration of activity: 2.5 hours
Group members participating: Thomas, Rasmus, Peter
The Goal of the session...: Building a Linefollower.
Setup:
We built the 9797 car once again, and loaded Linefollower onto the nxj. (Linefollower uses BlackWhiteSensor).
Experiments:
BlackWhiteSensor:
Because we already tested the lightsensor (week 1) we decided to skip straight to consturcting the ColorSensorClass.
ColorSensor:
Our first attempt at a colorsensor just sampled values for black, white and blue, and when asked which color it was on, it calculated the difference between a reading and these values, returning the color that had the least difference. The problem with this approach, was that whenever a blue was reported, the car stopped, because it thought it had reached the goalzone.
We modified the colorsensor, so you had to ask for a boolean on each color and we modified the car, so it counted the number of times a blue was reported. The car did not stop until 10 blues had been reported in a row. (A false reset the count).
Here are the final versions of
No comments:
Post a Comment