Using Waits, Loops and Switches WAIT please!. Waits, Loops and Switches Pre-Quiz 1. In programming, what is a loop? When is a loop useful? 2. How can.

Slides:



Advertisements
Similar presentations
EducateNXT The Corridor Challenge The Corridor Challenge requires programming of a robot to negotiate obstacles and the corridor walls in order to reach.
Advertisements

How Do You Make a Program Wait?. 1. What is an algorithm? 2. Can you think of a reason why it might be inconvenient to program your robot to always go.
How Does a Sound Sensor Work?
Follow the Light Follow the Light Presentation > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Robot Soccer Challenge
EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages of the.
More switches Day 6 Computer Programming through Robotics CPST 410 Summer 2009.
From the NXT top menu Connect desired hardware as indicated Enter a command in the box indicated from the menu provided Repeat for all 5 boxes.
An Intro to Robots and Computer Programming
Remote Control Using Bluetooth. 1. Give two examples of electrical connections. 2. What is the difference between wired and wireless connections? 3. What.
Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007.
BEGINNER EV3 PROGRAMMING Lesson
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform.
Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Control Using Sound. 1. What is sound? 2. How does the LEGO sound sensor sense sound? 2 Control Using Sound Pre-Quiz.
Don’t Bump into Me!. 1. How do bats sense distance? 2. Describe how bats sense distance in a “stimulus-sensor-coordinator-effector- response” framework.
Loops and Switches. 1. What kind of blocks are these? 2. Name two kinds of controls that can be specified to determine how long a loop repeats. 3. Give.
Music by Touch. 1. Provide an example “stimulus-sensor- coordinator-effector-response” framework for both your (human) sense of touch and the robotic.
What Is a Program?. What Is a Program? Pre-Quiz 1. What is a program? 2. What is an algorithm? Give an example. 2.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals.
Navigating a Maze. Navigating a Maze Pre-Quiz 2 1. What is the difference between a program and an algorithm? 2. About how many inches does an NXT move.
Getting Started! Lego Mindstorms Program NXT 2.0.
Maze Challenge Maze Challenge activity > TeachEngineering.org
Wait Program! WAIT please!. 1. Why is it often better to use conditional commands rather than program a robot to move exact distances? 2. What is the.
More switches, Comparison Day 7 Computer Programming through Robotics CPST 410 Summer 2009.
Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]
GIRLS Robotics Objective of today Review last Saturday’s Lesson Create our 1 st robot.
Sentry System Multiple Sensors
Lego MindStorm An Introduction to Blocks. Blocks Blocks are used to give instructions to your robot. There are many types of blocks You can use the blocks.
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
Entering your user ID into the NXT Clicker *Your User ID is your Netpass username.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON DATA WIRES.
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
Mindstorm NXT-G Introduction Towson University Robotics.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
Advanced issues in Robotics and Programming Dr. Katerina G. Hadjifotinou Experimental Junior High School of the University of Macedonia.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
EV3 Binary Bluetooth Functions An Introduction to Brick-to-Brick Communication.
How Do You Make a Program Wait?
The Corridor Challenge
LEGO MINDSTORMS PROGRAMMING
Line-Follower Challenge
BEGINNER PROGRAMMING LESSON
Mindstorms EV3 Programming
NXT-G Binary Bluetooth Functions
By Sanjay and Arvind Seshan
Follow the Light Follow the Light Presentation > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Mindstorms EV3 Programming
Introduction To Programming with LEGO NXT 2
Robot Soccer Challenge
Navigating a Maze.
Mindstorms EV3 Programming
Loops and Switches Pre-Quiz
Music by Touch Music by Touch Presentation > TeachEngineering.org
Module F: Presentation Understanding Robot Fundamentals
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
Forward Until Touch Robot goes forward until it hits a wall.
Line Following Behavior
Navigating a Maze.
SENSORS.
Maze Challenge Maze Challenge activity > TeachEngineering.org
INTERMEDIATE PROGRAMMING LESSON
Using Waits, Loops and Switches
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

Using Waits, Loops and Switches WAIT please!

Waits, Loops and Switches Pre-Quiz 1. In programming, what is a loop? When is a loop useful? 2. How can you control the duration for which a loop repeats? 3. In programming, what is a switch? 2

1. In programming, what is a loop? When is a loop useful? A loop is an operator that allows us to repeat a set of commands indefinitely. Loops are useful when you need to repeat a set of commands multiple times. 2. How can you control the duration for which a loop repeats? You can control how many times a loop repeats by clicking the dropdown arrow next to “Control” on the loop block and setting it to forever, time, sensor, count or logic. 3. In programming, what is a switch? In programming, a switch is an object that gives different commands depending on the state it is in. 3 Waits, Loops and Switches Pre-Quiz Answers

Do This: First, attach 2 touch sensors (name them A and B) and a sound sensor to your robot. Then program the robot to perform the following task: Stay at rest and display “Ready” on the screen until detecting a loud noise. Once a loud noise is detected: Move left and display “Left” whenever touch sensor A is pressed. Move right and display “Right” whenever touch sensor B is pressed Move forward and display “Forward” whenever both touch sensors A and B are pressed. Stay at rest and display “Stop” when no buttons are pressed. ***Hint: Click on the icon, drag the block into the program, and select “Text” from the dropdown menu to display text on screen. 4 Wait Block Activity Objective: Combine wait blocks, loops and switches to perform a task

Wait Block Activity Solution

various settings Wait Block Activity Solution

various settings (continued) Wait Block Activity Solution

various settings (continued) Wait Block Activity Solution

Waits, Loops and Switches Post-Quiz 1. In programming, what is a loop? When is a loop useful? 2. How can you control the duration for which a loop repeats? 3. In programming, what is a switch? 9

1. In programming, what is a loop? When is a loop useful? A loop is an operator that allows us to repeat a set of commands indefinitely. Loops are useful when you need to repeat a set of commands multiple times. 2. How can you control the duration for which a loop repeats? You can control how many times a loop repeats by clicking the dropdown arrow next to “Control” on the loop block and setting it to forever, time, sensor, count or logic. 3. In programming, what is a switch? In programming, a switch is an object that gives different commands depending on the state it is in. 10 Waits, Loops and Switches Post-Quiz Answers

11 brainstorming: Thinking of ideas as a group. iteration: Doing something again, especially with the intent to make improvements. loop: An operator that repeats a set of commands. switch: In programming, a switch is an object that gives different commands, depending on the state it is in. Vocabulary

12 Slides 1: wall switch drawing; source: Microsoft® clipart: us/images/results.aspx?qu=light+switch&ex=1#ai:MC | us/images/results.aspx?qu=light+switch&ex=1#ai:MC | Device and programming images from LEGO MINDSTORM NXT User’s Guide Screen captures, diagrams and drawings by author Images Sources