Saturday, September 18, 2010

Mortimer Toes the Line

Today, we made Mortimer (the SciBorg) follow a black line! Observe:

This is a picture of the simple (?) program that did this:


But before this happened, we had to learn two things. Firstly, how the light reflectance sensor worked. We used this program to record and look at what the sensor saw. This allowed us to find what was 'black' and what was 'white', so that Mortimer could know if he was over black or white.


 We also had to learn how to make and name our own Boolean blocks, which are the purple ovals (the 3 and 4 correspond to what number plug the reflectance sensors were in). These are almost like the yellow 'myblocks' that we named and that allow us short cuts, but these are written very differently. There is a part of the PiCO program that can let you, literally, type out the program. And this is how you name, write, and save your very own Boolean block.


Putting all these things together, Mortimer did this: He turned right until his right reflectance sensor told him he was over black, and then he started turning left until his left sensor told him he was over black, and then repeated it all over again. This gave him his drunken-like swing over the line. Good job, Mortimer!

Till later, hang tight.
Lucia

No comments:

Post a Comment