Developed in collaboration with Introduction to Programming.

Slides:



Advertisements
Similar presentations
ROBOTC for CORTEX While Loops Part 1
Advertisements

Variables and Functions ROBOTC Software. Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal.
Engineering Roles We will be forming groups of 3 students
Automation and Robotics
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
VEX Robotics Platform and ROBOTC Software Introduction.
VEX Robotics Platform and ROBOTC Software
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.
ROBOTC for CORTEX Teacher Training
Connecting VEX and ROBOTC
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
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.
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.
7.2 V battery pack and charger Put the battery in the charger station at the end of the lab. period. Red light indicates charging. Ken Youssefi Introduction.
Programming Design ROBOTC Software Principles of Engineering
Robot C and Natural Language
Vex Robotics Program six: combining autonomous and radio control.
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.
Variables and Functions ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
ROBOTC for CORTEX.
Vex Robotics Program four: reversing and turning.
ROBOTC for CORTEX Teacher Training
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 for CORTEX Teacher Training – Not for students – Replace with studentds power point © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Vex Robotics Program Two: Using two motors. Program two: using the motors In the last section, you learned how to turn on one motor. Now, you will take.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Vex Robotics program three: using motors and sensors together.
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.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
Connect VEX and ROBOTC Electrical Engineer Responsibilities © 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 By Jesse Flot.
Bot Shop Jane Taylor Dee Wallace Robot C For Vex.
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.
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 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
ClawBot Beginning Programing.
VEX® Robotics Platform and ROBOTC Software
Introduction to Programming
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
Automation and Robotics
StarStruck in a Virtual World: Fantasticbot Version
Programming Design ROBOTC Software Computer Integrated Manufacturing
By Willem Scholten Learning Access Institute
Automation and Robotics
VEX® Robotics Platform and ROBOTC Software
Getting Started in RobotC
VEX® Robotics Platform and ROBOTC Software
Programming Design ROBOTC Software Principles Of Engineering
VEX® Robotics Platform and ROBOTC Software
Automation with RobotC
VEX® Robotics Platform and ROBOTC Software
Automation with RobotC
Programming Design ROBOTC Software Principles of Engineering
Presentation transcript:

Developed in collaboration with Introduction to Programming

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

Platform Type Allows you to toggle ROBOTC’s programming mode between the Natural Language (VEX Cortex), VEX Cortex, and the VEX PIC; enables features and commands specifically for the selected system Select Innovation First, then Natural Language

VEX Cortex Download Method Allows you to specify: 1.How programs are downloaded 2.Whether the Cortex looks for a VEXnet connection when it starts up

Sample Programs To generate the Natural Language Function Library, go to File, Open Sample Programs, PLTW, PLTWtemplate

Function Library The Function Library will be populated by all of the Natural Language commands. These can be drag-and-dropped into your program. Place you cursor over the commands for more details about each one.

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

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

Movement Commands that allow you to control individual motors / servos

Special Commands that control the more unique VEX Hardware – LED’s and Flashlights

Until Commands that allow you to create behaviors where the robot acts “until” a certain event. For example, –Button Press –Potentiometer Value

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

ROBOTC Help Includes in-depth explanations about the ROBOTC interface, commands, debugger, ect

Help Documentation Additional detail about the Natural Language commands can be found in the ROBOTC Help under “Natural Language Functions”

Motors and Sensors Setup Menu Allows you to configure and name all of the motors and sensors connected to your Cortex.

Motors and Sensors Setup Menu The information in ROBOTC Motors and Sensors Setup should match the schematic on your project lab sheets.

Comments Comments are used to make notes for the human programmers // Single line comment – everything after “//” is ignored by the ROBOTC compiler

Comments /* Multi-line comment*/ - everything between the “/*” and “*/” symbols is ignored by the ROBOTC compiler

Let’s start a ROBOTC Program

ROBOTC Practice Program Open a Sample Program Go to File > Open Sample Program > PLTW>PLTWtemplate

ROBOTC Practice Program 1. Rename file and save to student directory 2. Complete heading information 3. Describe task

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

ROBOTC Practice Program Write pseudocode turn the motor on for 3 seconds at full power, then off for 10 seconds. Then back on for 3 seconds at ½ speed, off for 2 seconds and reverse at ½ power for 3 seconds.

ROBOTC Practice Program Complete Motors and Sensors Setup Notice the #pragma statements that are automatically generated

ROBOTC Practice Program Convert pseudocode to program code using the Natural Language Function Library to drag and drop commands. All commands belonging to task main must be in- between these curly braces Defines the “main task” of the robot. Every program must contain a task main

ROBOTC Practice Program 1. Save Program 2.Connect the Cortex to the Computer (via USB) 3.Turn on the Cortex 4.Go to Robot > Compile and Download Program (f5) 5.Run the program – Observe the motor turn on and off and reverse.

ROBOTC Practice Program Edit the program to start when a pushbutton switch is pressed and stop when a limit switch is pressed.

ROBOTC Practice Program You may notice warnings or errors. Make sure you spell motor and sensor names exactly as defined in Motors and Sensors setup. A ; is needed at the end of each line of code. Don’t forget every open parenthesis needs a closing parenthesis. What is wrong with line 31?

ROBOTC Debugger The ROBOTC Debugger allows you to view and manipulate all of the values of your motors, sensors, timers, and variables. Now that we’ve configured the motors and sensors, let’s view their values using the ROBOTC Debugger.

ROBOTC Debugger Make sure your robot is connected to your computer and turned on, and download the program. When the Program Debug Window appears, press the Start button and make sure the Refresh Rate is set to Continuous.

ROBOTC Debugger Open the Sensor Debug window by going to Robot > Debug Windows > Sensors

Sensor Debug Window The Sensor Debug window will appear, and display all of the values of the configured sensors. 0 = on, 1 = off 0 = released, 1 = pressed

ROBOTC Practice Program Modify your program so that an LED comes on when the motor is on, and goes off when the motor is off. Where in the function library are the LED commands? What do you type into the (digitalPort)? Compile and Download the program. Test

Resources ROBOTC.net: –The ROBOTC Forum: VEX Cortex Video Trainer – eaching_robotc_cortex/index.htmlhttp:// eaching_robotc_cortex/index.html The FIRE Project: – titions/best/ titions/best/ Robotics Academy – x/index.htmhttp:// x/index.htm

References Carnegie Mellon Robotics Academy (2011). VEX Cortex Video Trainer. Retrieved from obotc_cortex/index.html obotc_cortex/index.html