Lesson 3: Sensor Wait-for’s Programming Solutions

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Sensors For Robotics Robotics Academy All Rights Reserved.
Squaring or Aligning on a Line
EducateNXT NXT... an introduction The Kit and the Software.
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
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.
Get to know your WOW (Workstation On Wheels). There are 3 types of WOW’s Howard Cart SV21 SV22.
Testbed: Exercises.
Creative Inventions and Robotics Programming with Robolab By Rebekah Gendron.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
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.
LabVIEW Basics Review LabVIEW Robotics Fundamentals.
Programming a light sensor to follow a black line.
Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
Robots Week 3a Programming Lesson 2: Modifiers, Loops and Jumps Programming Solutions.
Negative Power or Negative Rotation makes robot go backwards. But if both are negative, the robot will go forward! Move Steering Block.
3 | Touch sensors Created by H. Robinson & A. Gostelow TOUCH SENSORS.
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.
Clap On, Clap Off Introductory Presentation. Opening Activity What is a sensor? Can you give examples? ?
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.
Lesson 4: Conditional Statements Programming Solutions.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
Oregon Robotics Tournament and Outreach Program RCX Basics.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Lesson 1: Motors and Sound Programming Solutions.
How to make a Line Follow program Using EV3 software and an NXT light sensor.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
-Make sure you get the right size - Hint: check the shoes you are wearing right now.
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.
Smart Board Troubleshooting.  The User Guide contains useful information such as installing, connecting, maintaining, and troubleshooting your Smart.
4 |Multitasking Created by H. Robinson & A. Gostelow Multitasking.
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
USING SWITCHES TO PROGRAM A CANDY SORTER DESIGNED FOR USE WITH LMS EV3 PROGRAMMING AND BUILDING ENVIRONMENT.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
How Do You Make a Program Wait?
By Sanjay and Arvind Seshan
LEGO MINDSTORMS PROGRAMMING
Understanding Communication with a Robot? Activity (60 minutes)
Squaring or Aligning on a Line
Module 2 Controlling a Lego EV3 Robot
By Sanjay and Arvind Seshan
By Sanjay and Arvind Seshan
Touch Sensor.
Using Switches to Program A candy Sorter
Canon Customer Support First you need to turn on your Printer. Press & hold the “Reset button” on the printer. While pressing the “Reset.
BEGINNER PROGRAMMING LESSON
Loops and Switches Pre-Quiz
Music by Touch Music by Touch Presentation > TeachEngineering.org
Automation and Robotics
BEGINNER EV3 PROGRAMMING Lesson
Introductory Presentation
Introductory Presentation
TECH 1 BAMS Technology Education
Forward Until Touch Robot goes forward until it hits a wall.
Beginner Programming Lesson
Line Following Behavior
By Sanjay and Arvind Seshan
Using Switches to Program A candy Sorter
EV3 Programming guide to “Following”
SENSORS.
BEGINNER PROGRAMMING LESSON
Automation with RobotC
Automation with RobotC
Obstacle Detection.
Lego MINDSTORMS EV3.
BEGINNER PROGRAMMING LESSON
Oregon Robotics Tournament and Outreach Program
Implementing Variables in Your Programs
Presentation transcript:

Lesson 3: Sensor Wait-for’s Programming Solutions

Exercise 1: Solution Turn on motor A in the forward direction. When the touch sensor is pressed and held, reverse the motor direction. When the touch sensor is released, stop the motor. Turn on forward Wait for press Wait for release Stop Reverse Notice you can string several icons to the same sensor port

Exercise 2: Solution Start by holding the light sensor over the white piece of paper. When the light sensor is moved over the black piece of paper, turn on motor A in the forward direction. Turn off the motor when the light sensor is moved back over the white piece of paper. Wait until sensor sees the black paper Wait until sensor sees the white paper Use a threshold that is halfway between white and black. Your light level may vary.

Exercise 3: Solution Write a program that beeps once every time the rotational sensor is turned 1/4 rotation. Do this 10 times. The program resets the number of ticks to 0 every time through the loop. Use a loop to do this 10 times. Remember: There are 16 ticks per 1 revolution so 4 ticks = 1/4 rev.

Exercise 4: Solution When the touch sensor is pressed, turn on motor A in the forward direction. Then, turn the rotational sensor 1 1/2 rotations to turn the motor off. IMPORTANT: Different sensors must be on different ports. 24 ticks = 1 1/2 rotations

Lesson 3: Sensor Wait-for’s Troubleshooting Tips

Problem 3a Why won’t the light sensor work? This is a motor port.

Solution 3a Sensors need to be connected to Sensor ports 1, 2 or 3.

Problem 3b What’s wrong with this set up? The touch sensor is connected to port 1. But the software says the touch sensor is on port 3.

Solution 3b Connect the touch sensor to port 3. Or, change the port number in the software.

Problem 3c Why won’t the touch sensor work?

Solution 3c Make sure the cable is connected to the front of the touch sensor. WRONG RIGHT

Problem 3d What isn’t too great about the way the light sensor is mounted?

Solution 3d If the light sensor is too high, it has a harder time distinguishing between black and white. Mounting it lower to the ground will help.

Problem 3e What’s wrong with this program? What is the default port?

Solution 3e Remember: Different sensors MUST be on different ports in the software. If a port is not specified, it assumes Port 1.

Problem 3f This program should turn on motor A until the rotational sensor has turned 2 revolutions, then turn off the motor. Why doesn’t it work? Hint: What is the default number of ticks in a Wait-for Rotation icon?

Solution 3f The default number of ticks is 16, or 1 revolution. For 2 revolutions, you must specify the number of ticks with a numeric constant modifier. 32 ticks = 2 revolutions