Project Overview Introduction & Product Analysis Drawing & communication Sensing abilities in robots Programming Robots Mechanisms and Systems Designing new products & Packaging Presentation and Rendering Biomimicry Concept Modelling Concept presentations
LESSON 04
LEARNING ABOUT PROGRAMMING LESSON 1 STARTER Learning objective: Learn about programming robots to operate autonomously, making use of time, motion and sensors. Design a new HEXBUG robot which operates differently to others! LEARNING ABOUT PROGRAMMING What is programming? Some HEXBUG’s are already autonomous. This means they are able to move freely without any human intervention. They respond to other HEXBUG’s as well as the environment they are placed in. Look at these HEXBUG’s, what sort of decisions are they making to make them autonomous? New words: autonomous, decision, environment
Programming Your Friends Activity Part 1 For this activity you will need to work in pairs. One person will need to be blindfolded or close their eyes Your partner must give you instructions on how to get you from one place in the room to another, ONLY ONE INSTRUCTION AT A TIME You must use the following “code”: CODE START STOP FORWARD REVERSE TURN CLOCKWISE TURN ANTICLOCKWISE
Programming Your Friends Activity Part 2 This time, the code gets a little more complex CODE START STOP FORWARD REVERSE TURN RIGHT TURN LEFT MEASUREMENTS ANGLE DEGREES SECONDS STEPS CLOCKWISE ANTICLOCKWISE
Programming Your Friends Activity Part 3 Now you have to program them fully before they set off and you are not allowed to speak to them while they are in operation. CODE START STOP FORWARD REVERSE TURN RIGHT TURN LEFT MEASUREMENTS ANGLE DEGREES SECONDS STEPS CLOCKWISE ANTICLOCKWISE
What is Psuedocode? Example: Make a robot turn 360 degrees and end up where it started: MOVE FORWARD 1 SECOND TURN CLOCKWISE 90 DEGREES What is Psuedocode? You have actually just been programming using psudocode in your teams. Psudocode is ordinary language used by programmers before they choose a computer language. Psuedocode is the “starting point” for programming robots! New words: psuedocode, computer language, degrees
Sensors? Sensing: Thinking back to the “Sensors” lesson, which Hexbug was able to sense what?
Programming with Psuedocode B C D E 1 2 3 4 5 Activity Create psuedocode for the HEXBUG NANO so: Starts in A1 Finishes in E5
Programming with Psuedocode B C D E 1 2 3 4 5 Activity Create psuedocode for the HEXBUG LARVA so: Starts in A1 Finishes in A1 Detects the Wall
Programming with Psuedocode B C D E 1 2 3 4 5 Activity Create psuedocode for the HEXBUG ANT so: Starts in A1 Detects the Wall Sticks in a LOOP
New Hexbug Design Brief You are required to design your own Hexbug using whichever and how many sensors you want. You need to think about where the sensors will be placed and what the new Hexbug will do? You will need to produce pseudocode coding to help you explain this.
LESSON 4 PLENARY As a class, let us consider the following questions? A. What is pseudo code? B. What do we measure angles with? C. Why do sensors make products more expensive? D. How does programming and code work together to create a working product?
Summary Today you have: Learning objective: Learn about programming robots to operate autonomously, making use of time, motion and sensors. Design a new HEXBUG robot which operates differently to others! Today you have: Learnt what psudocode is and how it can be used by programmers and coders in robotics Program your “Friends” and other “Hexbug’s” using psuedocode and make them become autonomous Develop a new Hexbug that you have yourself programmed selecting the appropriate sensors you want!