ROBOTC for VEX Online Professional Development By Jesse Flot.

Slides:



Advertisements
Similar presentations
Automation and Robotics
Advertisements

Developed in collaboration with Introduction to Programming.
VEX Robotics Platform and ROBOTC Software Introduction.
VEX Robotics Platform and ROBOTC Software
ROBOTC for CORTEX Teacher Training
Testbed: Exercises.
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
ROBOTC Software Introduction. ROBOTC Software ROBOTC developed specifically for classrooms and competitions Complete programming solution for VEX Cortex.
ROBOTC for VEX On-Site Professional Development
Coding for the FIRST Tech Challenge: RobotC
Introduction to the VEX ® Robotics Platform and ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
Programming Design ROBOTC Software Principles of Engineering
Robot C and Natural Language
ROBOTC for VEX Online Professional Development. Warm-up Activity Review/Watch videos from VCVT –Especially the ones from the Fundamentals and Movement.
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Getting Started in RobotC // Comment task main() motor[] {} wait1Msec() ; = Header Code Compile Download Run Take out your notes.
ROBOTC for CORTEX.
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
ROBOTC Software EV3 Robot Workshop
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
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.
ROBOTC for CORTEX Teacher Training. ROBOTC Overview Thinking about Programming.
ROBOTC for Testbed © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
Programming Basics - RobotC Introduction to Robotics.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
ROBOTC for VEX Online Professional Development Instructor: Jesse Flot
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
ROBOTC for VEX On-Site Professional Development. Lab Procedures Logging onto CS2N.org – Log in with your user name and password VEX Robots/chargers –
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
ROBOTC for VEX CORTEX Professional Development Jesse Flot.
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
ROBOTC for VEX Online Professional Development Jesse Flot.
With. Project Overview  Introduction to Factory Automation Numerical Control  Build an autonomous robotic solution  Testing an autonomous robot build.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
After Construction Name: Per #:.
Programming Design ROBOTC Software Principles Of Engineering
VEX® Robotics Platform and ROBOTC Software
VEX® Robotics Platform and ROBOTC Software
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
Introduction to Programming
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
ROBOTC for VEX On-Site Professional Development
Robotics Programming Using Shaft Encoders
Automation and Robotics
Programming Design ROBOTC Software Computer Integrated Manufacturing
ROBOTC for CORTEX Teacher Training
Movement using Shaft Encoders
RobotC Sensors.
Automation and Robotics
ROBOTC for CORTEX Teacher Training
TECH 1 BAMS Technology Education
VEX® Robotics Platform and ROBOTC Software
Getting Started in RobotC
VEX® Robotics Platform and ROBOTC Software
Programming Design ROBOTC Software Principles Of Engineering
Automation with RobotC
VEX® Robotics Platform and ROBOTC Software
Robotics Programming Using Shaft Encoders
Robotics Programming Using Shaft Encoders
ROBOTC for CORTEX Teacher Training
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming Design ROBOTC Software Principles of Engineering
Presentation transcript:

ROBOTC for VEX Online Professional Development By Jesse Flot

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

Tech Check

Voice communication –Introduce yourself –Checkmark yourself Screen sharing –DEMO: Starting ROBOTC –LAB: Show your ROBOTC

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

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

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

Hardware Overview

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

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

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

ROBOTC Overview

Background Information ROBOTC is developed specifically with teachers, classrooms, and competitions in mind Complete programming solution for the VEX PIC, VEX Cortex, and several other popular robot platforms Approved for VEX Robotics, BEST, TSA and RoboFest Competitions! Only programming language for the VEX PIC and VEX Cortex with a real-time debugger –You’ll learn more about this feature later on Very similar to industry-standard C programming –Students get real-world programming experience

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

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

Visual Studio IDE and Code

ROBOTC IDE and Code

ROBOTC Features

Platform Type Allows you to toggle ROBOTC’s programming mode between the VEX PIC and VEX Cortex, will enable features and commands for the system

ROBOTC Start Page Displays the latest ROBOTC news, version of ROBOTC, and ROBOTC Resources

Sample Programs Over 100 Included ROBOTC Sample programs, organized by robot behavior

ROBOTC Help In-depth explanations about the ROBOTC interface, commands, debugger, etc

Function Library Lists the available functions, with a description. List of available functions will expand or shrink depending on the “Menu Level”

Menu Level Customizes the ROBOTC interface and Function Library based on the user’s experience level

VEX Cortex Communication Mode Allows you to specify: 1.How programs are downloaded 2.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

VEX Cortex Video Trainer using ROBOTC

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

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

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

ROBOTC Programming

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

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

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

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?

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

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)

Basic Movements Forward / Reverse

Basic Movements Point Turns

Basic Movements Swing Turns

Basic Movements Manual Adjustments

ROBOTC “Natural Language”

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();

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

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

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

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

Sample Programs

Moving Forward and Backward

Quick ROBOTC Exercise Use the Natural Language commands to create a program that: 1.Turns on leftMotor and rightMotor at ¾ speed for 5 seconds Download and watch result 2.Reverse both motors at ¼ speed for 5 seconds Download and watch result

Program Planning

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

The Labyrinth Challenge

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!

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

Pseudocode Sample Pseudocode:

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.

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!

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.

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

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