gearBot  

 

Learn to program

 
  GearsBot Python assignments ::

 

 
 

Assignment 13 Line after Line

You must program your robot to stop at the first line it sees, then go on to stop at the second line.

 

football practice

lesson10 pic 2

lesson10 pic 3

This is not as simple as it seems. Make a flow chart similar to this:

Move forward

Do I see black?

If yes, stop for 2 seconds, if no, loop back to 'Move'

Continue with the flow chart - you could use a conditional inside a conditional, or you could use an easier do-around

Watch the lesson video:

Download this image, and load it onto the simulation.

Write a program to
--make the robot move back to the start
--move to the first black line and say 'black';
--move to the second black line and stop
--you MUST use the color sensor and a variable
Make sure that I see it running, and

Save it to a folder on your computer as lineyourname.

Make sure that I see it running, and

Save it to a folder on your computer as lineyourname.

To turn it in, look at the instructions below or watch this video:

  • Go to Google Drive
  • Open the Class Program folder in 'Shared with me'
  • Open your class folder and assignment folder
  • Click on the "New" button on the top left
  • Upload the program from your computer

 

Write a Reflection on what you have learned.