How to use the
Learning Portal

Learning Portal

Our hands-on, comprehensive lesson plans span a range of levels. Browse our free STEM and coding learning resources.

Marty Image

1.17 – Secret Handshake

45 Minutes

Lesson Overview

We have already looked at responding to touch using bump switches, but another way to respond to this kind of action is to look at the motor readings from the servos. Doing this, we can tell when pressure is placed on Marty’s arms and program him to respond, for example, to carry out a handshake with someone!

Key vocabulary:
    Servo , Motor reading , Pressure , Reaction/Response , Force,

Content Sections

  • Learning Objectives
  • Extensions & Challenges
    • Additional Reading
    • 1.17 – Secret Handshake

      45 Minutes

      Lesson Overview

      We have already looked at responding to touch using bump switches, but another way to respond to this kind of action is to look at the motor readings from the servos. Doing this, we can tell when pressure is placed on Marty’s arms and program him to respond, for example, to carry out a handshake with someone!

      Key vocabulary:
        Servo , Motor reading , Pressure , Reaction/Response , Force,
      • Lessons 1.1-1.16
      • Laptop, PC or Tablet
        • Marty the Robot
        • Marty Workbook (Lesson 3)
        • Laptops/Computers/Tablets
        • Access to the Scratch editor

      Learning Objectives

      • Explore the values that are being read from the motors during different movements/pressures
      • Understand that when pressure is placed on the motor then the reading value increases
      • Program Marty to carry out a handshake when someone puts some pressure on Marty’s arm

      1. Talk to students about what happens when we put a force on something, i.e. it usually moves or if it is a button then something happens

      2. We have already programmed Marty to respond to touch using bump switches but another way we can do this is by reading the motor values

      3. In small groups, get students to create a number of variables that hold the motor value for Marty’s left and right arms (note that students might want to multiply the value by 1000 to get a value that is easier to read!)

      a. Note down what the values are when he is stationary, and nothing is touching him

      b. Does this change when he walks?

      c. What about when we gently apply some pressure onto one of his arms?

      4. Program Marty to take part in a short handshake with someone when he feels a force on his arm (when the value is greater than 3)

      a. Experiment with using different values here instead of 3 to start a handshake

      5. Extend the handshake to create a unique and secret handshake between your group and Marty

      Extensions & Support

      • Explore what the values are for the other joints with motors (the dropdown list will help if students aren’t sure which joints will have a motor reading associated!)
      • Program Marty to respond to a force on these different joints – for example, on the eyes!

      Additional Reading

      • Educator’s Guide
      • Introduction to Programming with Marty using Scratch