Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROBOTC for VEX Online Professional Development Instructor: Jesse Flot

Similar presentations


Presentation on theme: "ROBOTC for VEX Online Professional Development Instructor: Jesse Flot"— Presentation transcript:

1 ROBOTC for VEX Online Professional Development Instructor: Jesse Flot

2 Welcome Tech Check Tools VEX Hardware Basic Movement Program Planning
ROBOTC Natural Language

3 Tech Check

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

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

6 Tools

7 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

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

9 Hardware Overview

10 VEX 2.0 Cortex Overview Coordinates the flow of information and power on the robot All electronic components interface with the Cortex 10 Motor Ports 8 Analog Sensor Ports 12 Digital Sensor Ports VEXnet Wireless I2C and UART Ports

11 RECBOT 2 Driving Motors 1 Arm Motor 2 Quadrature Encoders
1 Potentiometer 1 Touch Sensor 1 Ultrasonic Rangefinder 1 Gyroscope

12 Squarebot and Swervebot
These robot models will work, too, with some small adaptations:

13 ROBOTC Overview

14 Background Information
ROBOTC is developed specifically with teachers, classrooms, and competitions in mind Complete programming solution for the VEX Cortex, VEX IQ, VEX PIC, and several other popular robot platforms (with simulations!) Only programming language for the VEX Cortex and VEX IQ with a real-time debugger Quickly see motor and sensor values, troubleshoot issues Very similar to industry-standard C programming Students get real-world programming experience Trainer Notes: The next few slides are meant to highlight features in ROBOTC that will help trainees succeed as they program and answer their own questions.

15 Industry Standard Coding
Students that learn ROBOTC Programming are also learning key components of Industry Standard Programming Languages...

16 Industry Standard IDE Students programming in the ROBOTC IDE are also learning how to use features in Industry Standard IDE’s...

17 VEX Cortex Video Trainer using ROBOTC

18 Trainer notes: Feel free to lean heavily on these videos
Trainer notes: Feel free to lean heavily on these videos. They do a decent job of breaking down the code and explaining behaviors, freeing you up to help troubleshoot. It’s highly recommended that you watch these together using your presentation computer and speakers, rather than having each attendee watch them individually – too much noise for anything to be intelligible.

19 VEX Cortex Video Trainer (VCVT)
50+ tutorial videos teach step-by-step how to program using ROBOTC and the Cortex 100+ pages of supplementary “helper guides” 40+ programming challenges Freely available at

20 Student-Paced Instruction
Everyone learns different things at different paces 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) VCVT can be used as a teaching aid One instructor can’t teach at 20 different paces simultaneously One instructor plus 20 computers can

21 VEX Cortex Video Trainer (VCVT)
60 tutorial videos teach step-by-step how to program using ROBOTC and the Cortex 100+ pages of supplementary “helper guides” 40+ programming challenges Freely available at Direct link to the video trainer:

22 VEX Cortex System Configuration

23 Platform Type Make sure to configure ROBOTC to work with the Cortex!

24 Compiler Target Make sure your Compiler Target is set to “Physical Robot”. Show this in ROBOTC IDE.

25 VEX Cortex Communication Mode
Allows you to specify: How programs are downloaded Whether the Cortex looks for a VEXnet connection when it starts up With “VEXnet or USB” the Cortex will look for a VEXnet connection before running code Trainer Notes: You can have attendees switch to “USB Only”, but you will have to remember to have them switch back before doing any wireless programming or remote control programs.

26 VEX Cortex Microcontroller
The Cortex has two processors that are responsible for different tasks Master Processor: VEXnet communication, low-level motor control User Processor: Interpret ROBOTC Programs Each processor has software called “firmware” that allows it to perform its tasks Trainer Notes: Quick overview of the system, for new trainees.

27 Activity: Download Firmware
Step 1: Choose Appropriate Platform Type Step 2: Update Master and ROBOTC Firmware

28 ROBOTC Programming

29 Motor Port 3 Forward Defines the “main task” of the robot
All commands belonging to task main must be in-between these curly braces

30 Motor Port 3 Forward Turns the port3 motor on at full power forward

31 Motor Port 3 Forward End Result: robot spins one motor for 3 seconds
Robot stays here in the program for 3000 milliseconds End Result: robot spins one motor for 3 seconds

32 Get Your Motors Running
Motor Check Right Motor is plugged into MOTORS 2 Left Motor is plugged into MOTORS 3 Download Sample Program File > Open Sample Program > Training Samples > Motor Port 3 Forward Run the Sample Program What does it do? How could we make the robot move forward?

33 Renaming and Reversing
Robot > Motors and Sensors Setup Optional with Motors Giving Motors custom names Reversing motor polarity

34 Naming Rules The Motors and Sensor Setup window allows you to give your motors and sensors custom names. The names, however: Should be descriptive of the sensor or motor they refer to (rightMotor, frontBumper, ect.) Must be all one word made up of letters, numbers, and underscores Must contain no special characters (&, $, /, ect.) Cannot already be a ROBOTC reserved word (task, motor, true)

35 Basic Movements Forward / Reverse

36 Basic Movements Point Turns

37 Basic Movements Swing Turns

38 Basic Movements Manual Adjustments

39 ROBOTC “Natural Language”

40 ROBOTC Natural Language
Goal is to lower the barrier of entry into syntax-based programming by simplifying the code and using more “natural” command names Lines of code for common robot behaviors are consolidated into single commands forward(); lineTrackforTime(); stop(); untilBump();

41 ROBOTC Natural Language
The Natural Language is an additional Platform Type in ROBOTC:

42 ROBOT Motion Commands that cause the entire robot to perform a behavior

43 Wait Commands that wait for an elapsed amount of time in seconds or milliseconds

44 Setup Allows you to specify what type of robot configuration you have from pre-specified models (RECBOT, Swervebot)

45 Sample Programs

46 Moving Forward and Backward

47 Quick ROBOTC Exercise Use the Natural Language commands to create a program that: Turns on leftMotor and rightMotor at ¾ speed for 5 seconds Download and watch result Reverse both motors at ¼ speed for 5 seconds Trainer Notes: This slide is meant to be a class activity, for trainees to actually get some guided experience with the ROBOTC interface, ROBOTC Commands, Cortex system, ect. The steps should be: Open ROBOTC Verify the Platform Type is set to Cortex Natural Language Library Create the Program Connect the Cortex to the Computer (via USB or VEXnet) Turn on the Cortex Go to Robot > Compile and Download Program Run the program – Observe the testbed Turn on leftMotor in the program, after rightMotor and before the wait command (left motor should also be turned off after the wait command). Compile and Download the Program Run the Program – observe the testbed Reverse the motor powers for both motors Download and run the program – observe the motors spinning in the other direction.

48 Coming Soon! Graphical Mode
All of the Natural Language commands have been converted into drag-and-droppable blocks No more “syntax” mistakes or typos for new programmers

49 Program Planning Trainer Notes: The following slides detail program planning. At this point the Program Planning doc can be distributed or referenced during the training. All group exercises should follow the program planning steps to get in the habit of following it.

50 Behavior Based Programming
A behavior is anything your robot does: turning on a single motor, moving forward, tracking a line, navigating a maze Three main types of behaviors: basic behaviors – single commands to the robot (turn on a motor) simple behaviors – simple task performed by the robot (move forward, track a line) and complex behaviors – robot performs a complex task (solve the maze) Complex behaviors can always be broken down into simple behaviors, which are then broken down into basic behaviors Trainer notes: Supplementary printouts found in the Fundamentals > Introduction to Programming section can be printed and handed outs.

51 The Labyrinth Challenge
Trainer Notes: Introduce the Labyrinth challenge as a possible programming challenge. Additional challenge description / schematic can be found in the VEX Cortex Video Trainer > Movement > Challenge Description Section. This can be printed and handed out, if desired. The Labyrinth was chosen for this example because it allows for a very simple, visual representation of the topics. Things like the PLTW Material Sorter could also be discussed, as that would resonate well with the PLTW network.

52 The Labyrinth Challenge
Trainer notes: this is the path the robot will have to take to complete the labyrinth, broken down from a complex behavior, into simple behaviors

53 Programming Discussion
The Challenge: The Labyrinth The Solution: ??? The Programmer’s (your) Role Understanding Program Flow and Behavior Based Programming Plan out the robot’s path / actions - Pseudocoding Translate the Pseudocode into real code The Robot’s role To carry out your instructions! The Solution: Programmer and Robot working together, fulfilling their roles True for all robotic challenges!

54 Pseudocode Pseudocode is a shorthand notation for programming which uses informal programming structures (if touch1 is pressed…) verbal descriptions of code (move forward, stop) Emphasis is placed on expressing the behavior or outcome of each portion of code rather than on correct syntax (it should be reasonable, though). Your lines of Pseudocode should also be listed in the same order as they will appear in the ROBOTC Program

55 Pseudocode Sample Pseudocode:

56 Pseudocode Additional Details:
Pseudocode is used to outline a program before translating it into proper syntax. Helps in the initial planning of a program, by creating the logical framework and sequence of the code. An additional benefit is that it can be translated into different programming languages and is therefore somewhat universal.

57 Putting it all Together
Effective Program Planning is essential to writing correct code. Carrying out that plan is equally important! Once you have your plan, don’t try to implement it all at once! Systematically add sections of code, testing at every step!

58 ROBOTC Rules/Syntax Syntax is the cause of 80% of programming errors…
Most important thing to do when troubleshooting: Check Syntax Missing Semicolons Incorrect Braces on Structures Misspelled words Improper ‘case’ – motor vs. MoToR ROBOTC is friendly about most of these errors... but can’t catch everything.

59 Labyrinth Challenge Begin programming for the Labyrinth Challenge!
Use Standard ROBOTC or the Natural Language Remember to Pseudocode the Behaviors first!

60 Homework! Homework assignments can always be found and turned-in on CS2NLearn You’ll also be expected to watch a series of videos for review Optional practice quizzes will prepare you for the certification exam at the end

61 Overview

62 What are ? RVWs are simulation environments that run virtual robots programmed in ROBOTC.

63 Why RVW (Initially)? Many classrooms don’t have enough robots for students Very few students have robots at home to do homework or make up missed classwork The Robot Virtual Worlds Project tackles both of these problems by allowing students to program virtual robots using the same ROBOTC Software VEX and LEGO Versions Available Every version of ROBOTC 3.x comes with a free 60-day trial! Free licenses available on CS2N for individual student use!

64 Why RVW (Now)? Research between the Carnegie Mellon University Robotics Academy and the Learning Research and Development Center at the University of Pittsburgh shows that learning to program in a simulated environment is actually more effective than with physical robots!

65 Why RVW (Now)? continued…
Programming with a simulated robot greatly reduces wasted class time Very little time spent getting ready for class Robots automatically reset to their start location No broken motors, sensors, gears, etc. No low batteries in the robot or joysticks Debugger information is always readily available Flot, J., Lui, A., Schunn, C., Shoop, R. (November 2012). Learning How to Program via Robot Simulation.  Robot Magazine,

66 RVW Solutions Classroom Environments Competition Environments
Curriculum Companion Tables Level Builder Competition Environments VEX Skyrise VEX IQ Highrise Themed / Game Environments Ruins of Atlantis Operation Reset Palm Island

67 Classroom Environments

68 ROBOTC Curriculum Step-by-step tutorial videos teach students how to program using motors, sensors and remote control Practice challenges allow students to apply what they’ve learned

69 Curriculum Companion All of the practice tables found in the free ROBOTC Curriculum but in a virtual environment Students follow along with the tutorials and go through the practice challenges, but with virtual robots Every student in a classroom can learn to program, even at home!

70 Virtual Robots Virtual robots emulate their real-world counterparts
Several robots available, based off of models used in curriculum Have working light sensors, encoders, touch sensors, ultrasonic sensors, compass sensors and motors Still communicate with the ROBOTC Debugger!

71 Achievements / Badges As students complete challenges, they earn badges similar to modern games Designed to motivate them, engage them in CS activities long-term Badges are also displayed on CS2N.org, allowing teachers and parents to track progress

72 Tracking Progress CS2N.org also allows teachers to create “Groups” with their students RVW Challenge Completion and Quiz scores are all presented in convenient, easy-to-understand format

73 Using Robot Virtual Wolds
Switch Robot > Compiler Target to Virtual Worlds Choose Window > Menu Level > Select Virtual World to Use > Curriculum Companion Compile and Download a Program to Launch the Virtual World

74 Logging In Log In via CS2N, Local, or use a Guest Session (progress will not be saved)

75 Robot Selection Choose from multiple robots.
View robot dimensions and configurations.

76 Challenge Selection Choose between challenges. Open the challenge PDF.
View available Achievements. Press START ACTIVITY to launch challenge.


Download ppt "ROBOTC for VEX Online Professional Development Instructor: Jesse Flot"

Similar presentations


Ads by Google