Lesson 2A-Mazing Marty

Knox badge
Marty RobotInteractive Instructions
Marty Robot

BGE Computing

J Balfour 2022


Your first task is to make the Marty Robot move. Using a ruler, determine how far Marty moves in a single step.

Since you have now discovered that Marty moves 0 centimetres at a time, your next step is to find out how many steps Marty will need to take to get the the yellow marker on the map.

How many steps were needed to get to the yellow zone on the map?

Now that you know that he took 0 steps to reach the yellow zone, you can now calculate how many steps are needed to get to the next zone very easily.

Try out what you have just created.

Using this information, you can now determine how many steps will be needed to get to just before the wall on the big map.

Now make Marty move to the wall and back again.

What you have most likely done is set the number of steps both ways manually, so if he took ten steps to move forwards, you then made him move back ten steps.

From your Scratch lessons, how could you make this more efficient (i.e. what block in Scratch allows you do something multiple times)?

Using a structure similar to one found within Scratch, make Marty move to the yellow line and back three times.

Making it even more efficient

Marty is a powerful little robot. He has many different tools and features that help make him more useful. For example, he has a sensor that allows him to detect colours with his feet.

These sensors can be used to detect a colour which Marty is expected to walk to. By using some kind of structure that allows Marty to carry something out repeatedly, we can make Marty move until he gets to a location.

Colour is composed of three different components, red, green and blue. These three components need to be checked when Marty is using his colour sensor to ensure that he is on the correct colour.

You can use the following colour input to select a colour and you can input the RGB values to test out what each of them make up.

Using the sensor built-in to Marty, make Marty move to the yellow block and then back.

To do this, place Marty on the yellow block and then use the sensor to determine each component, red, green and blue. Once you have establish what red, green and blue components are needed for the colour of the paper, you can compare them as shown:

Sensor code

Watch the following video to see exactly what you will need to do:

Finishing the maze

This task is in your groups.

Your job is to make Marty go from one side of the map to the other side of the map, collecting the yellow zone and stopping when it gets to the red zone. You start in the green zone.

Your code should be programmatically written to take advantage of things like the sensors and blocks that allow you to repeat something multiple times.

The following rules apply to this program:

  • If Marty goes off to the side slightly (drifts), you can give him a little push to put him back on track again.
  • If Marty senses black underneath him then the program should stop.
  • If Marty senses yellow and there is not enough room for him to turn around, you may manually help him rotate.
S1 Marty Robot Lessons
Provide feedback

What did you think of this?

-- DragonDocs version 0.9 --


Started on DragonDocs
Created a YASS/PHP and HTML-based system for saving and retrieving data

Added CSS styles to page
Added JavaScript code to the page

Added the multipage option (used in my dissertation)
Added the XMLHttpRequest-based multipage requests

Added the Accessibility features
Filters added

Purple filter added

Added the Note class
Added the Did You Know class

-- DragonDocs version 1.0 (Yosemite) --

First trial of DragonDocs in teaching

Added the Task, Starter, Review your learning sections

Added the feedback feature
Added the Dark Mode toggle

Performance gains through the removal of unnecessary code
Added the Learning Intentions and Success Criteria features
Added the school badge

Changed the headings (h2) to be more consistent with my website
Added sections to the pages - sections must be preceded by a h2
Added the "I have read this section" buttons
Changed the main heading zone to gradient text like my website
Added the table of contents feature

Added the Print feature
Updated the footer to feature a new gradient
Added the Test It! class
Added the green flag
Automated the table of contents using JavaScript

Added the 'includes' feature to the document, allowing inclusion of other files easily
Removed the requirement that the IP address must be one of the schools I have taught at, opening these documents to the public

Once a section has been read or completed, the user can now hide that section

Added the Extension task class
Changed the scrollbar on Windows to match that of macOS

-- DragonDocs version 2.0 (Kilimanjaro) --

Added the Save button and the ability to save 'results' or answers to a Word document

Added the large numbers class
Removed the background of the page navigation

-- DragonDocs version 2.1 (Aurora) --

Added the active class to active links in the bottom section

Added the image upload feature

Added a fix that prevents the upload of non-image files into an image upload
Added pasting images to the upload feature

Added the ability to view the changelog from a document
Improved the feedback system by recording the DragonDocs User ID and the Document ID data
The feedback from DragonDocs can be accessed much easier

Added the new step_by_step_mode feature, allowing sections to be viewed individually