ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2016 Tuesday Day 2

Slides:



Advertisements
Similar presentations
Add and Use a Sensor & Autonomous For FIRST Robotics
Advertisements

Engineering Roles We will be forming groups of 3 students
Sensors.
Automation and Robotics
ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014
Using the NXT Light Sensor. 2 Connect One Light Sensor – 1 From My Files use Left / Right NXT buttons and get to View menu and push Orange button. From.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
Connecting VEX and ROBOTC
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
Testbed: Exercises.
ROBOTC for VEX Online Professional Development
Program ultrasonic range sensor in autonomous mode
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
ROBOTC for VEX On-Site Professional Development
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Maze Challenge Maze Challenge activity > TeachEngineering.org
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
VEX Robotics Design System Sensors A Brief Overview
ROBOTC for VEX Online Professional Development. Warm-up Activity Review/Watch videos from VCVT –Especially the ones from the Fundamentals and Movement.
Sentry System Multiple Sensors
EV3 Software EV3 Robot Workshop
ROBOTC Software EV3 Robot Workshop
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014 My name is Jason McKenna I will be leading you through these sessions Teacher for 17 years Hopewell.
Connect VEX and ROBOTC Electrical Engineer Responsibilities © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
Forward Until Near Stop when near a wall.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
ROBOTC for VEX CORTEX Professional Development Jesse Flot.
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions? Concerns? Homework Policy: All homework is due Friday, August.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
LOGICFUSION’S HANDS-ON ROBOTICS EV3 LEVEL 2! Welcome to.
How Do You Make a Program Wait?
VEX IQ Gyro Sensor Measures rotational angle of the robot
LEGO Robotics Workshop
Introduction to Programming in RobotC
Electrical Engineer Responsibilities
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
2.8 NXT Test Programs (Try Me Mode) U2C8
VEX IQ Curriculum It’s Your Future Lesson 11 Lesson Materials:
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
ROBOTC for VEX Online Professional Development
Deriving Consistency from LEGOs
ROBOTC for VEX Online Professional Development
Electrical Engineer Responsibilities
Understanding Communication with a Robot? Activity (60 minutes)
ROBOTC for VEX Online Professional Development
ROBOTC for VEX On-Site Professional Development
Using tools and the ‘Wait’ Block
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
Touch Sensor.
Electrical Engineer Responsibilities
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Electrical Engineer Responsibilities
RobotC Sensors.
Introductory Presentation
Loops and Switches Pre-Quiz
Automation and Robotics
TECH 1 BAMS Technology Education
An Introduction to VEX IQ Programming with Modkit
An Introduction to VEX IQ Programming with Modkit
EV3 Programming guide to “Following”
Maze Challenge Maze Challenge activity > TeachEngineering.org
Compiled from various Internet sources Presented by Mr. Hatfield
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Lego MINDSTORMS EV3.
Presentation transcript:

ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2016 Tuesday Day 2 Heath Lauster: Instructor Zach Deloe: Tech Assistant

Review from Monday Introduction and Tech Check Software introduction: VEXos Utility Robot C version 4.54 Hardware Overview Download first program (Physical or Virtual) Mini Challenge – 50cm Challenge Program your robot to travel exactly 50 cm! Homework Arm Movement Sensabot Challenge Turning Orchard Challenge

Arm Control In order to control the arm of our VEX IQ Clawbot, we will need to use a new Command Block: the moveMotor Command Block Change your setting to 315 degrees. Positive values raise the arm and negative values lower the arm. Try it!

Arm Control - Gearing The arm motor needs to turn 315 degrees to move the arm between the up and down positions, but the arm itself does not move 315 degrees. This is because the gears that connect the motor to the arm are not the same size. The gear on the motor is very small compared to the gear that is actually attached to the arm. The smaller gear will need to turn many times in order to turn the larger gear around even once.

Arm Control - Gearing However, this configuration also provides the motor with "mechanical advantage", trading more rotations for more strength as it turns. This allows the motor to keep the arm under control even when the robot is holding something that makes the arm heavy.

Claw Control The moveMotor command block can also be used to control the claw motor The claw has a very small range of motion, so it’s possible for the program to “get stuck” if you set the motor to move to a position it cannot reach

Claw Control To make sure that your claw does not get stuck, set the moveMotor command to move for “seconds” Even if too many seconds are selected the command will “time out”

Mini Challenge: Cargo Transport Program your robot to pick up the object in front of it, then carry it 85 cm, drop the object, and back up to its starting point.

Sensabot Challenge View the curriculum video on the Sensabot: Section 1 of the Moving Forward Chapter. Then, review the Sensabot challenge by viewing the challenge tab of the Moving Forward chapter. If you get done early, program the TouchLED sensor to flash a different color every time the robot raises its arm.

Turning in Place Use the following Command Block to make your robot turn. What happens? Is it what you expected? Why not?

Turning in Place Units of Turn What happens if you switch the second box of the turnLeft or turnRight command from Rotations to Degrees? Try it!

Turning in Place Mini Challenge: 90 Degree Turn Challenge Program your robot to turn exactly 90 degrees to its right! Place two pieces of tape so they form 90 degree angles. Place your robot so it faces along one piece of tape, and program it so that it turns to face directly along the next piece.

Orchard Tractor Challenge

Math and Robots

Math and Robots How did you solve the 50 cm problem? How did you solve the math problem behind it? Some common methods: Scale Factor (“Scaling” multiples of a known quantity) Rate: Unit Ratio (# of X in a single Y, times the number of Y’s) “Rate” relationship Find #degrees/1cm, then multiply that rate by the total What about #degrees per floor-line? Rate: Raw Ratio (# of X per # of Y, times the number of Y’s) Find 360degrees/20cm, then multiply that rate by the total Direct Proportion (Traditional “ratio” equation) 20 cm = 50 cm 360 deg X deg Solved mechanically using cross-multiplication Solved algebraically as a Linear Equation of One Variable

Robot Math: Turning Find the corner to corner wheel base 19cm x 3.14 = 59.66cm Round up to 60cm To make a right turn the robot has to physically do a ¼ turn. 60cm/4 = 15cm Conversion base on wheels 360°/20cm = 18 degrees/cm 15cm * 18 degrees/cm = 270° Or .75 rotations

The M in STEM Did you all solve the same problem? Did you all get the same answer? Did you all use the same method? Did it matter? Answer Problem

The M in STEM To measure distance, we have many tools… Why should robotics be any different? Why should mathematics be any different? Give students more tools and more experience in choosing and using them!

The M in STEM steM Many STEM teachers will not be teaching in “Math class”, yet when Math is the correct tool… Make the math explicit; don’t waste the opportunity! Embrace multiple methods of solving the same problem; students need more tools at their disposal, not conflicting information about which ones are “better” than others (none are, use what works!)

Abstraction Bridges Criticism: What good is Robot Math? Is the SAT going to ask you about encoder counts and wheel rotations? Refining the math skills Generalize understanding (apply to other numbers and contexts) Practice Compare these problems: A robot moves 3 meters in 2 turns of its wheel. How far does it go in 6 turns of the wheel? You can get 3 T-shirts for 2 dollars at the mall. How many can you get for 6 dollars?

Underlying Math Structure Abstraction Bridge Problem-pair is one type of Abstraction Bridge Same question, different context Are these the same question? 20 cm in 412 degrees, find deg/cm 200 mi in 41.2 dollars, find mi/$ 120 cm is 80% of the total. How many cm to go? 80% of 30 questions were correct. How many wrong?

Expedition Atlantis

Sensors and the VEX IQ

Sensors Sensors are part of what makes a robot, a robot. Rather than just blindly running sequences of instructions……robots use sensors to gather information about the world around them, and respond appropriately. You have already used the Rotation Sensors built into the VEX IQ Motors. Robots: Sense, Plan, Act Now, we will investigate several uses for the Bumper Switch, or Touch Sensor.

Bumper Switch Simple Mechanical “bumper switch” Returns a value reporting if pressed or released (not pressed) No firmware updates available for the Bumper Switch sensor Default Port for ROBOTC Graphical: Port #8

Move Until Touch Watch Section 3 of Forward Until Touch videos in section 1, 3, and i. Follow along and create a program that has the robot move forward until the Bumper Switch is depressed. Please pay close attention to the information on section 3 pertaining to Boolean Logic. Once complete begin the Vacuum Challenge.

Vacuum Challenge

Motors Debug Window Displays the status of all of the motors configured on your robot “Readable” and “Writable”

VEX IQ Distance Sensor Measures distances of objects by using high frequency sound Has the ability to detect up to three different object distances at the same time Default Port for ROBOTC Graphical: Port #7

Forward Until Near Watch Section 3 of Forward Until Touch videos in section 1 and 3. Follow along and create a program that has the robot move forward until near. Please pay close attention to the information on section 3 pertaining to how the distance senor works. Once complete begin the Dynamic Maze Challenge.

How does a Distance sensor work? A distance/sonar sensor sends out an ultrasonic pulse and measures the amount of time the sound wave takes to reflect off of an object and return to the sensor. The VEX IQ Distance Sensor can detect multiple “echos” to try and distinguish between three different objects: Closest Object to Sensor 2nd Closest Object to Sensor Largest Object (relative to sensor/distance) The distance sensor returns all values in millimeters for maximum precision. Wall

Measuring Distances Create a program that will move the robot forward until the distance sensor detects and object/wall less than 300mm (30cm) away. Why is the motor speed set to negative 50? Wall

Forward Until Near: Threshold Values The waitUntil (Distance Sensor) command uses a "Threshold" cutoff value to determine when to wait, and when to continue with the program.

Dynamic Maze Challenge In this challenge, you will program your robot to move from the starting area through a maze with tall vertical walls. Use the Ultrasonic Sensor to navigate through the maze without touching any walls and ultimately reaching the goal zone regardless of what the distances were between the walls.

Dynamic Maze Challenge

Dynamic Maze Challenge Hints The pattern of turns cannot change, so you don’t need to worry about using a sensor (other than Rotation) during turns Because of the length of the robot, try raising the arm up to shorten the effective length of the robot.

VEX IQ Gyro Sensor Measures rotational angle of the robot Constantly keeps track of angular position and direction. The gyro sensor only tracks rotation in one axis (as denoted by the sensor). Default Port for ROBOTC Graphical: Port #4

Turn for Angle Watch Section 3 of Forward Until Touch videos in section 1 and 3. Follow along and create the programs that has turn for angle part 1 and part 2. Please pay close attention to the information on section 3 pertaining to how the gyro sensor works. Once complete begin the Dynamic Maze Challenge.

How does a Gyro work? Red Line = Zero Angle A gyro measures angular rotation based off of a “zero” point. With the VEX IQ gyro, counter-clockwise rotation will increase (+) the gyro’s value in degrees Clockwise rotation will decrease (-) the gyro’s value. Z Gyro Value +45 Degrees Z Gyro Value -45 Degrees

Golf Course Mower

Golf Course Mower Hints If using virtual world make sure the robot drives over the red or muddy areas. Try using a repeat a preview to the next section program flow.

VEX IQ Color Sensor Measures simple colors Measures color hue Measures independent Red, Green, and Blue in 256 levels each Measure ambient light level (line tracking) Detects objects (proximity) Default Port for ROBOTC Graphical: Port #9

Simple Colors (Names) The VEX IQ Color sensor is able to detect 12 different “simple colors” These “simple colors” are the same as the TouchLED’s color names Acceptable Color Names colorRedViolet / colorRed colorDarkOrange / colorOrange colorDarkYellow / colorYellow colorLimeGreen / colorGreen colorBlueGreen / colorBlue colorDarkBlue / colorViolet

Color Sensor Values The VEX IQ Color sensor is capable of several different modes:  Color Name, Grayscale, Hue, and Proximity. The readings from the color sensor are extremely sensitive to “ambient” light in the robots environment. 

VEX IQ Color Sensor

Color Sensor Values Watch the videos in the “Forward Until Color” section. Then, complete the ‘Try It!’

Traffic Light Challenge

Troubleshooting and Debugging

Troubleshooting Perspectives How do you direct someone to your house? Tell them where your house is Figure out their own location Find their own route Pick them up and take them there See the sights, but don’t learn the route Guide them Take into account where they are Figure out the best route, given their starting point

Troubleshooting Perspectives Learner-Centered Instruction Don’t just throw out the information without regard for where the student’s understanding is currently (Knowledge-centered instruction) Don’t just focus on results out of context (Assessment-centered instruction) Instead, make sure you practice “learner empathy”: Understand what the student thinks the situation is Plan a path for the student to reach a correct understanding Guide the student down the path

STAR Troubleshooting Follow the guiding STAR: Student’s intent: What does the student THINK should be happening based on his or her current understanding? Trace: Trace through the program to identify where the robot’s behavior diverges from the student’s intent Analyze: What did the student misunderstand? Revise: Correct the student’s misunderstanding, then change the program to reflect the new understanding

Solving Problems The Problem The Really Real Problem The Real Problem

Troubleshooting Code What’s the intent of this code? Where did it go wrong?

Troubleshooting Code What’s the intent of this code? Where did it go wrong?

Troubleshooting Code What’s the intent of this code? Where did it go wrong?