Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014

Similar presentations


Presentation on theme: "ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014"— Presentation transcript:

1 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 Area School District—Gifted Coordinator History and Elementary Education Certified

2 Part 0 Class Procedures

3 Class Procedure Classes will all be recorded Goals of the class
Navigating through the class I can unmute you to speak, just raise your hand Ask questions also via the chat or Q&A Box Questions will be geared towards beginners

4 Tech Check

5 Tech Check Voice communication Screen sharing Introduce yourself
Checkmark yourself Screen sharing DEMO: Starting ROBOTC LAB: Show your ROBOTC

6 What can you teach with a robot?
Type your thoughts in the space below

7 Tools

8 Tools CS2NLearn - The Learning Management System (LMS)
Logging in, and where to post homework Three Main Pieces of Software 1. WebEX 2. ROBOTC Application 3. ROBOTC Curriculum / Tutorial Videos

9 Tools The Forums Class Forum for announcements and asking questions can be found under the Announcements and Information section: Active ROBOTC Community

10 Monday Hardware Overview

11 Hardware Overview VEX IQ Brain Remote Control Smart Motors
12 Ports: Connect any device to any port! Remote Control Wireless 900mhz remote control allows both autonomous programming and remote control Smart Motors Tons of features (more on this soon) Available Sensors Bumper (Physical Touch) Touch LED (Capacitive Touch) Color Gyro Distance (Sonar)

12 Preparing the VEX IQ Robot
Before we can begin programming, we’ll need to get a few things prepared Updating VEX IQ Brain Updating VEX IQ Motors Updating VEX IQ Sensors Installing ROBOTC Firmware Software Required: VEX IQ Firmware Update utility ROBOTC for VEX Robotics 4.X

13 VEX IQ Robot—Firmware Update

14 VEX IQ Robot—Firmware Update
Plug all devices into the Robot Brain and plug the Robot brain into your computer via USB Turn on the Robot Brain

15 VEX IQ Robot—Firmware Update
3. Open the VEX IQ Firmware Updater and click “Update All Components”

16 VEX IQ Hardware Configuration
Important Note: Your VEX IQ brain will only recognize newly connected devices when first “powered up” If you connect, move, or disconnect any VEX IQ device - make sure to power your robot off and then back on!

17 VEX IQ Clawbot Our robot for this class is the “VEX IQ Clawbot”
Four Motors Used Port 1: Left Drive Motor (leftMotor) Port 6: Right Drive Motors (rightMotor) Port 10: Lifter Arm Motor (armMotor) Port 11: Gripper/Claw Motor (clawMotor) Gripper Lifter Arm Right Drive Left Drive

18 VEX IQ Clawbot Standard Sensor Ports Port 2: Touch LED
Port 3: Color sensor Port 4: Gyro sensor Port 7: Distance Sensor Port 8: Bumper Switch

19 Battery—charge after today’s class

20 Battery—charge after today’s class

21 Battery—charge after today’s class

22 Getting Started Watch About VEX IQ & Your First Program Videos in the Getting Started Section Videos discuss the VEX IQ System, writing your first program, and downloading your first program These videos will get you acquainted with ROBOTC Graphical and the VEX IQ Curriculum The 3rd video in the Your First Program Sections discusses camera controls in the Robot Virtual World, we can skip that video for right now.

23 Monday First Program – Moving Forward

24 Before You Begin Make sure you have done the following:
Updated the VEX IQ Brain, Motors and Sensors Installed ROBOTC Firmware Chose the correct compiler target

25 Moving Forward The basics of programming with the ROBOTC Graphical Programming language is to take a command from the function library and drag it into the editor. Let’s start with the Forward command block

26 Moving Forward Mini Challenge: 50 cm Challenge
Program your robot to travel exactly 50 cm! Place two pieces of tape so they are 50cm apart from each other on the VEX IQ Challenge Field Place your robot so that the front wheels are on the tape.

27 Backward Command What happens when you use a Backward command in your program instead of a Forward command? Write a program using a Backward command instead. Try it!

28 Moving Forward What happens if you choose "Seconds" as the unit in a Forward movement command? Try it!

29 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!

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

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

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

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

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

35 Precise Distance D = C * R 90 = 20 * R R = 4.5

36

37 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!

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

39 Software Overview

40 What is ROBOTC? A complete ‘C’ programming language for robotics.
Developed for Teaching, Powerful enough for Hobbyists/Professionals Developed in Microsoft Visual C Extremely easy to use for both beginners and advanced users Most “robot functions” are a single line commands. Competition Friendly/Approved Easy to use template architecture allows students to create basic competition-ready program in only minutes.

41 What is ROBOTC? Developed for Education
Students learn in a friendly environment about C-Based programming Friendlier Compiler, GUI Device Configuration, Code Templates C-Based programming offers more transferability of job-related skills compared to graphical languages. C is the most popular programming language in the world! Used in development of LINUX, Windows and Mac Operating Systems

42 What is ROBOTC? C Language extensions for robotics
Built-in variables for robotics devices – motors, sensors, joysticks Example: One line command to drive motors VEX IQ – setMotorSpeed(motor1, 50); //Turn Motor 50% forward User “friendly” compiler Auto-correct from popular programming errors “:” for “;”, . . . Letter case errors in variable names: “playSound” for “PlaySound”.

43 Student Paced Instruction
Everyone learns different things at different paces This class is no different… Everyone MUST move at a different pace Going too fast results in failure and frustration Going too slow results in loss of attention (i.e. future failure) Teaching ROBOTC VEX IQ Curriculum can be used as a teaching aid One instructor can’t teach at 20 different paces simultaneously One instructor plus 20 computers can!

44 Big Ideas and Teaching

45 Big Ideas What can you teach with a robot?
How do you teach with a robot? What do I need to know about programming?

46 Preconceptions & Pedagogy
You have preconceptions Students have preconceptions New information has to be reconciled with existing beliefs Something has to give! Contradictory statements can coexist in the mind …this is called CONFUSION We want to get rid of this. Effective instruction requires teachers to address preconceptions effectively

47 Preconceptions Do we expect you to believe this yet? NO!
You can’t change preconceptions by simply making claims and justifications Preconceptions are too closely linked to the rest of our world view 2 ways to change belief: Repeated experience Trauma We prefer this one, but hey…

48 Teaching with Robotics
Often, you will encounter a problem

49 Teaching with Robotics
Solve the problem

50 Teaching with Robotics
Problem solved…

51 Teaching with Robotics
Problem not solved??

52 Teaching with Robotics

53 Teaching with Robotics

54 Teaching with Robotics

55 Teaching with Robotics

56 Teaching with Robotics

57 Teaching with Robotics

58 Teaching with Robotics
The Problem The Really Real Problem The Real Problem

59 The Robotics Teacher Instruction vs. Unstruction
What happens if you just solve the problem for the student? Remove the tip of the iceberg Don’t actually solve the problem At a loss to explain why the same problem re-emerges soon after Result: Confuses students Teaches dependence as a solution Make it work Understand the underlying problem and solution Build an understanding that leads to a solution

60 Understand the underlying problem and solution
The Robotics Teacher Level 1: Answer Level “Explode” the iceberg (tip) Short term solutions Shallow understandings “Solving the problem” often doesn’t solve the problem! Be aware of, but do NOT stop or let your students stop here Make it work Understand the underlying problem and solution

61 Understand the underlying problem and solution
The Robotics Teacher Level 2: Student Level Realize the underlying nature and scope of the problem (whole iceberg) Find a way to solve the real problem Students need to achieve this level of understanding Make it work Understand the underlying problem and solution

62 The Robotics Teacher Level 3: Teacher Level “Remove” the water
Expose the problem Build an understanding Lead the student toward a working solution to the “whole” problem You must reach this level Make it work Understand the underlying problem and solution Build an understanding that leads to a solution

63 The Robotics Teacher Instruction vs. Unstruction
Teachers must operate fluently at the highest level This includes understanding a student’s level and perspective You must: Be aware of and eschew Level 1 understandings Construct a Level 2 understanding Expand into a Level 3 understanding Make it work Understand the underlying problem and solution Build an understanding that leads to a solution

64 Preconceptions Do we expect you to believe this yet?
Have you had repeated experience or trauma yet?

65 Orchard Tractor Challenge

66 Tuesday Math and Robots

67 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/20.4cm, then multiply that rate by the total Direct Proportion (Traditional “ratio” equation) 20.4 cm = 50 cm 360 deg X deg Solved mechanically using cross-multiplication Solved algebraically as a Linear Equation of One Variable

68 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

69 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!

70 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!)

71 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?

72 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?

73 Tuesday Sensors and the VEX IQ

74 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. Now, we will investigate several uses for the Bumper Switch, or Touch Sensor.

75 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

76 Move Until Touch Watch Section 3 of Forward Until Touch. Follow along and create a program that has the robot move forward until the Bumper Switch is depressed. When you are done, scroll down into the curriculum to the Vacuum Challenge.

77 Vacuum Challenge

78 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

79 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

80 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

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

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

83 Dynamic Maze Challenge

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

85 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

86 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

87 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?

88 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

89 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

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

91 VEX IQ Color Sensor

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

93 Tuesday Troubleshooting and Debugging

94 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

95 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

96 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

97 Solving Problems The Problem The Really Real Problem The Real Problem

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

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

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


Download ppt "ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014"

Similar presentations


Ads by Google