Presentation is loading. Please wait.

Presentation is loading. Please wait.

VEX IQ Gyro Sensor Measures rotational angle of the robot

Similar presentations


Presentation on theme: "VEX IQ Gyro Sensor Measures rotational angle of the robot"— Presentation transcript:

1 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

2 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

3 Turn for Angle View the curriculum video on the Gyro Sensor: Turn for Angle Section 3. Program your robot to make a 90 degree left turn. Afterwards…use the waitUntil Command Block to program your robot to make a 90 degree left turn. What is different?

4 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

5 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

6 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. 

7 VEX IQ Color Sensor

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

9 Tuesday Troubleshooting and Debugging

10 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

11 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

12 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

13 Solving Problems The Problem The Really Real Problem The Real Problem

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

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

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

17 Wednesday Program Flow

18 Program Flow Robots are often asked to perform highly repetitive tasks. Programmers can take advantage of this fact by writing code that repeats itself as well

19 Compare these two examples

20 Conditional Loops Repeat Forever Repeat for a count

21 Conditional Loop Use the repeatUntil command block to make a loop conditional to different sensor input

22 Program Flow Watch the videos in the “Loops” section and complete the Square Dance Mini Challenge.

23 Challenge: RoboMower Complete the ”RoboMower Challenge”
First “flowchart” or plan your program Then program your robot If finished early… Think… what commercial products work in a similar manner? How you could make your program more efficient?


Download ppt "VEX IQ Gyro Sensor Measures rotational angle of the robot"

Similar presentations


Ads by Google