Motion

Students will program their robot to move in a number of directions.

Topic
Purpose
Lesson
Task #1: Move Straight (& Writing Code in mBlock.).

This tutorial will show you how to write basic code for your robot with the program mBlock so that your robot will move straight.

  • Task 1a. Programming Your Robot To Move Straight
  • Task 1b.  Programming Your Robot To Turn
  •  Task 1c. Programming Your Robot To Move Backwards.
Click here.
!Save Your Program! Sign In, Title, Save & Open a New Project Now that you completed your first program (Move Straight) this tutorial will show you how to Sign In, Title & Save this past program and then how to Open a New Project. There are two tutorials, one for Chromebooks users and the second is for Standard Computer (PC) users.

Chromebook

Standard Computer

Task #2: Forward Turn & Forward Motion.

Program your robot so that it:  (View Task #1 inorder to successfully program Task #2)  

  • Waits 1 second to begin motion after the power switch has been activated.
  • Turns forward right for 3 seconds.
  • Stops and waits for 1 second.
  • Turns forward left for 3 seconds.
  • Stops and waits for 1 second.
  • Drives straight for 3 seconds.
  • Stop.
Video: Mobile or
You Tube
Task #3: Backward Turn &  Backward Motion

Program your robot so that it:

  • Waits 1 second to begin motion after the power switch has been activated.
  • Turns backward right for 3 seconds.
  • Stops and waits for 1 second.
  • Turns backward left for 3 seconds.
  • Stops and waits for 1 second.
  • Drives backward for 3 seconds.
  • Stop

Note: 

  • Duplicate the program you wrote for Task#2 and title this program, "Task3_MotionBackward."
  • This program is very simple. After you duplicate the program you wrote in Task #2, just change the lines of code  that allow the robot to forward to have it move backward.
  • In order to make a wheel move backwards, place a negative "-" in front of the Motion '%' number.
  • Since these lines of code do not provide a Length of Time that the robot should move... slide a "Wait Seconds" after them and choose the length of time that you woould like the robot to move.  



Video:Mobile or
You Tube
Task #4: The Maze Program your robot to complete the maze. Video: Mobile or
You Tube


Questions? jharrington@sthelenaunified.org