Let's learn to use the other sensor. This sensor detects light. It even has two small lenses like cameras, so it seems like our robot can SEE.
It cannot really see very much. When something moves close or farther away, this sensor can tell. It detects distance or motion.
Make Milo again. Go to the instructions here if you unbuilt it.
Then build the sensor arm at these instructions.
Make this program. Here's what it says:
1) Move forward at speed 4 ... for however long
2) While you are moving, wait for the sensor to notice a CHANGE in how far away things are. (Remember Milo can't tell what it's seeing, but can tell how far away things are. Click the orange block until it's on the double arrow. That means "you sense something closer OR farther than before.")
3) Then stop and play some music.
EXPERIMENT #1
Point the sensor straight ahead. Put the flower pot a few feet (that's one giant step or the length of your arm) in front of Milo. Let it start. Milo should stop when it gets close to the flower pot.
You might notice it doesn't matter which direction Milo's plastic googley eyes are pointing. They're not eyes. They're just to look cool.
EXPERIMENT #2
Point the sensor to the side. Put the flower pot ahead of Milo and to the side. Let it go. Milo should stop when it passes the flowers.
EXPERIMENT #3
Point the sensor straight ahead again. Will Milo bump into a wall?
EXPERIMENT #4
Please be careful with this one and be ready to catch Milo if it falls !
Point the sensor down and a a little ahead. Start Milo moving on a table toward the edge. Will Milo fall to its doom? Is this the end of our robot hero?
Spoiler alert: It should stop at the edge of the table.
EXPERIMENT #5
Point the sensor straight ahead. Put something in front of Milo - a can, a book standing on its edge, whatever.
In the program, you'll see when you pick up a block it stays attached to the blocks to the right. Drag the blocks around until the yellow hourglass block with the sensor is FIRST.Change the setting of the sensor by clicking it until it has an arrow pointing AWAY from the sensor. Milo will now detect if things become farther away.
Put the music second so Milo will play music when it starts moving.
Start the program. Nothing should happen. The yellow hourglass with the sensor will be lit up on your screen. Milo is waiting. Remove the thing you placed in front of Milo. It should start up!
You can do this with the racecar as well to give it a starting signal.