ROBOTC for VEX Online Professional Development Instructor: 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
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
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.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
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.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
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.
EV3 Software EV3 Robot Workshop
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
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
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 Online Professional Development. Robotics Competitions.
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.
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. Homework Questions Thoughts? Questions?
ROBOTC for VEX Online Professional Development By Jesse Flot.
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.
Robotics Education & Competition Foundation
After Construction Name: Per #:.
Programming Design ROBOTC Software Principles Of Engineering
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
Automation and Robotics
StarStruck in a Virtual World: Fantasticbot Version
Programming Design ROBOTC Software Computer Integrated Manufacturing
RobotC Sensors.
Getting Started in RobotC
Automation and Robotics
TECH 1 BAMS Technology Education
Getting Started in RobotC
Programming Design ROBOTC Software Principles Of Engineering
VEX® Robotics Platform and ROBOTC Software
Automation with RobotC
Robotics Programming Using Shaft Encoders
Robotics Programming Using Shaft Encoders
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming Design ROBOTC Software Principles of Engineering
Presentation transcript:

ROBOTC for VEX Online Professional Development Instructor: Jesse Flot

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

Tech Check

Tech Check Voice communication Screen sharing 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

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: http://www.robotc.net/forums/ 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 10 Motor Ports 8 Analog Sensor Ports 12 Digital Sensor Ports 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 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.

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

VEX Cortex Video Trainer using ROBOTC

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.

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 www.robotc.net

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 www.robotc.net Direct link to the video trainer: http://www.education.rec.ri.cmu.edu/products/teaching_robotc_cortex/index.html

VEX Cortex System Configuration

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

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

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.

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.

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

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

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

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.

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.

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.

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

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

Overview

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

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!

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!

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, 68-70.

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

Classroom Environments

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

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!

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!

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

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

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

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

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

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