gearBot  

 

Learn to program

 
  Finch assignments ::

 

 
 

Learning Goal: Student will be able to write a program that controls the robot
Daily objective: Student will understand the use of Python to program turns.

 

Watch the video explaining the lesson.

Lesson 4 notes.

 

Go to your Google Drive, and drag the A4 - Turns assignment to your AI Robotics folder.

Open this picture of a polar plot, and save it to your computer.

In the simulator, click on World, then click on 'Generate from image'.

select world

Click on Browse, open the polar plot, set the image scale factor to 3, and click OK.

This will open a polar plot world with the angles you will need to do the A Turns assignment on Google Drive.

Assignment 4 Part 1 - Do the A Turns assignment in your Google Drive. -

This is the Python code to use a pen:
tank_drive.on_for_rotations(speedleft, speedright, rotations)
pen_in5.setColor(0,0,0.5)
pen_in5.down()
pen_in5.up()

Next, answer these questions, then do

Assignment 4 Part 2 -

Open the Maze world in the simulator - SCROLL DOWN and set a SEED NUMBER of 11 for the maze -
this keeps the maze the same each time you run a program. Program your robot to reach the yellow corner of the world.

Download the program and save it to your OneDrive.

Change its name to ATurnsYourname.

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.