Home
Devil's Digest
Blue Review
Class Collaboration
Technology Classes

 

code

Programming

Students will program their robot to perform a variety of functions

Topic
Purpose
Lesson
Motion Gradesheet The gradesheet contains the instructor sign off for successfully completing each task, a maze map and instructions on how to successfully upload your code to the robot. You will be provided with a gradesheet. Move onto the next step to learn how to program in mBlock and make your robot move straight. Click here
Connecting to the mBlock Application You need to connect to mBlock, which is the application you will use to program your robot. Click here.
Program: Motion    
Writing Code in mBlock &
Task #1: Move Straight
This tutorial will show you how to write basic code for your robot with the program mBlock so that your robot will move straight. Click here.
Understanding How A Robot Turns.

This tutorial will explain how the wheels need to spin in order for the robot to turn.

Video: Mobile or
You Tube
Sign In, Title, Save & Open a New Project This tutorial will show you how to Sign In, Title & Save this past program and Open a New Project. This tutorial is specific to Chromebooks. Video: Mobile or
You Tube
Motion
Task #2:Turn & Forward Motion

Program your robot so that it:

  • 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
Motion
Task #3: Backward Motion & Turn

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."
  • 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 Time Length...slide a "Wait Seconds" after them and choose the length of time that you need.  

Video:Mobile or
You Tube
Task #4: The Maze Program your robot to complete the maze. Video: Mobile or
You Tube
Program: Line Follower Sensor    
Line Sensor Gradesheet The gradesheet allows the instructor to "Sign Off" each time the student successfully completes a task. Also, the gradesheet will provide images of the models and hints. Click here.
Line Sensor Tutorial
Program your robot so that you can test to see how it works and if your line sensor functions correctly. Students will be introduced to new Block Commands: "If/Then," "If/Then/Else," and "Forever." Click here.
Program: Ultrasonic Sensor    
Ultrasonic Gradesheet The gradesheet allows the instructor to "Sign Off" each time the student successfully completes a task. Also, the gradesheet will provide images of the models and hints. Click here.
Ultrasonic Tutorial Program the Ultrasensor on your robot so that when it detects objects at a specific task, it will follow your commands. Click here.
Final Project    
Final Project - Carpet City Students will program their robot to drive through a small carpet city. They will use the three skills they learned above: Motion, Line Sensor & Ultrasonic Sensor. Click here.


Questions? jharrington@sthelenaunified.org