Selection Learning Objective: to be able to design algorithms that use selection.

Slides:



Advertisements
Similar presentations
Photos and Sensor Instructions
Advertisements

Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
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.
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.
After Receiving this error code, Follow these steps to correct the problem… Click for next slide.
EDGE AVOIDER ROBOT USING I-BOT mini V3. EDGE AVOIDER USING I-BOT mini V3 Edge Avoider Robot is built using the IR based Line Detecting Module. The modules.
Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone.
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
Today’s Agenda 1.Scribbler Program Assignment 1.Project idea due next class 2.Program demonstration due Wednesday, June 3 2.Attendance & lab pair groupings.
Overview of Project 3 Slides are available at : Updated 1/28 Due Date for project has been extended to next Friday 2/6.
Digital Electronics Board-of-Education : Input. Board of Education - Input This presentation will explain, both from a hardware and software perspective,
Technical Writing for Robotic Coding!.  du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
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.
By Eric Greene RMS / I. S. 192 Q. Smart Start Question How would you get the robot to flirt with disaster by touching the edge of the “table” as many.
Photos and Sensor Instructions
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
ECE 002 Robots and Sensors Group 14. Objectives Research sensors and their usefulness to analyze data Research sensors and their usefulness to analyze.
Oregon Robotics Tournament and Outreach Program RCX Basics.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
Lesson 4 Accelerometer.
What is Arduino? It's an open source electronics prototyping platform: Open source: resources that can be used, redistributed or rewritten free of charge,
Half Turns and Quarter Turns.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
Sensors Control Systems with Flowol.
Selection Learning Objective: to be able to design algorithms that use selection.
Servo Positioning Pulse Width Direction of Rotation PULSOUT Period
Follow The Guidelines.
Stop Light Lab 7 Winter Quarter.
Learning Objective: to be able to design programs that use sequencing.
fischertechnik® RoboPro Software for Gateway To Technology® RoboPro
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
Game Controller Lesson Three.
Forward Until Touch Robot goes forward until it hits a wall.
Lesson 4 Accelerometer.
Line Following Behavior
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Global Challenge Night Sensor Lesson 2.
Training Room AV System Use Instructions
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Game Controller Lesson Two.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Line Following Behavior
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Sumo: Stay in Ring Algorithm
Photos and Sensor Instructions
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Iteration Learning Objective: to be able to design algorithms that use iteration.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Game Controller Lesson Four.
Arduino Uno circuit basics
Oregon Robotics Tournament and Outreach Program
Iteration Learning Objective: to be able to design algorithms that use iteration.
Learning Objective: to be able to design programs that use iteration.
Presentation transcript:

Selection Learning Objective: to be able to design algorithms that use selection.

Right Motor Forward Off Selection With selection different sets of instructions are executed depending on the result of a condition. Here is an example of an algorithm that uses selection: Start Right Motor Forward On Left Motor Forward Off Left Motor Forward On Right Motor Forward Off Button A Pressed? Button B Pressed? Yes No LOOP IF ButtonA.pressed THEN RightMotor.forward(off) LeftMotor.forward(on) ELSEIF ButtonB.pressed THEN LeftMotor.forward(off) RightMotor.forward(on) ENDIF ENDLOOP

Predict what this program will do: Activity 1 Here is the program code for the algorithm given on the previous slide. Predict what this program will do: Prediction: Now write this program and test it on Bobbot.

Activity 2 LOOP IF ButtonA.pressed THEN ELIF ButtonB.pressed THEN Design an algorithm in pseudocode that makes Bobbot move in different patterns of your choice when buttons A and B are pressed. LOOP IF ButtonA.pressed THEN ELIF ButtonB.pressed THEN ENDIF ENDLOOP

Place a screenshot of your code here: Activity 3 Use Touch Develop to create the program you designed in activity 2 and test it on Bobbot. Place a screenshot of your code here:

Line Sensor Bobbot is fitted with a line sensor that can be used to detect whether the surface it over is light or dark. The line sensor is connected to pin 1. LOOP IF LineSensor.light THEN Display(“L”) ELSE Display(“D”) ENDIF ENDLOOP

Predict what this program will do: Activity 4 Here is the program code for the algorithm given on the previous slide. Predict what this program will do: Prediction: Now write this program and test it on Bobbot.

Activity 5 LOOP IF LineSensor.light THEN ELSE ENDIF ENDLOOP Design an algorithm in pseudocode that makes Bobbot follow a dark line by turning right if it is over a light surface and turning left if it is over a dark surface. LOOP IF LineSensor.light THEN ELSE ENDIF ENDLOOP

Place a screenshot of your code here: Activity 6 Use Touch Develop to create the program you designed in activity 5 and test it on Bobbot. It should make Bobbot follow a dark line. Place a screenshot of your code here:

Extension (Part A) Design an algorithm that will make Bobbot move in a zig zag pattern if button A is pressed and follow a line if button B is pressed.

Place a screenshot of your code here: Extension (Part B) Use Touch Develop to create the program you designed on the previous slide and test it on Bobbot. Place a screenshot of your code here: