ROBOTC for VEX Online Professional Development

Slides:



Advertisements
Similar presentations
ROBOTC for CORTEX While Loops Part 1
Advertisements

Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Automation and Robotics
Developed in collaboration with Introduction to Programming.
VEX Robotics Platform and ROBOTC Software Introduction.
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.
Remote Control- RobotC
Testbed: Exercises.
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
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
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
Autonomy using Encoders Intro to Robotics. Autonomy/Encoders Forward for Distance In this unit, you will learn to use the encoders to control the distance.
ROBOTC for VEX Online Professional Development. Warm-up Activity Review/Watch videos from VCVT –Especially the ones from the Fundamentals and Movement.
Programming - Buttons. Ch 5-8 Joysticks work by moving the stick along an axis and thus any value between 127 & -127 can be sent. With the buttons they.
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Introduction to Vexnet
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
RobotC Remote Control. Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use.
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. Homework Questions Thoughts? Questions?
ROBOTC for VEX Online 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.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions? Concerns? Homework Policy: All homework is due Friday, August.
Decision Making: while loops and Boolean Logic. While Loops A while loop is a structure within ROBOTC which allows a section of code to be repeated as.
Sensor Information: while loops and Boolean Logic.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
After Construction Name: Per #:.
Introduction to Vexnet
VEX Cortex Video Trainer using ROBOTC
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
Introduction to Programming
ROBOTC for VEX Online Professional Development
ROBOTC for VEX On-Site Professional Development
Robotics Programming Using Shaft Encoders
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
Basics for Robotics Programming
Movement using Shaft Encoders
Autonomy using Encoders
By Willem Scholten Learning Access Institute
While Loops and If-Else Structures
Programming – Remote Control Statements
While Loops and If-Else Structures
Introduction to RobotC
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
Programming - Buttons Intro to Robotics.
if-else Structures Principles of Engineering
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming - Buttons Intro to Robotics.
Robotics Programming Using Shaft Encoders
While Loops and If-Else Structures
Automation with RobotC
Robotics Programming Using Shaft Encoders
While Loops and If-Else Structures
While Loops And If-Else Structures
Presentation transcript:

ROBOTC for VEX Online Professional Development

Homework Questions Thoughts? Questions?

Warm-up Questions How do the Shaft Encoders work? Compare and contrast the while loop with the if statement. What is Boolean logic?

Troubleshooting Student: One of my encoders is counting down even though the wheels are spinning forward.

Troubleshooting Student: My robot won’t stop turning.

Remote Control

VEXnet Joysticks An out-of-box VEX Cortex comes with basic built-in Remote Control functionality The VEXnet Joysticks do not have settings like the older Radio Control Transmitters ROBOTC enables full customization of how the VEXnet Joystick signals controls the Cortex If the Cortex and VEXnet Joystick are linked over VEXnet, there is no extra code to enable remote control – they’re already linked!

VEXnet Joysticks The VEXnet Joysticks and Cortex (when linked) continually send data back and forth Two Joysticks with two “Channels” each Values range from -127 to 127 12 Buttons A Pressed button = 1, released = 0 Built in Accelerometer X and Y values No crystal or chance of interference, Cortex and VEXnet Joysticks create their own wireless network over VEXnet

Wireless Programming and Debugging The connection between the VEXnet Joysticks and Cortex can be used to wirelessly download the ROBOTC Firmware, ROBOTC Programs, and debugger data! Even when you’re not actively “using” the VEXnet Joysticks, it’s transmitting and the batteries are draining. Batteries last ~2 hours; use it wisely!

VEXnet Configuration Switch your VEX Cortex Download Method to Download using VEXnet or USB Remember that you will need to download a program and power-cycle the Cortex for the setting to take effect.

VEXnet Configuration 2. Connect the VEXnet Joysticks to the computer and update its firmware

VEXnet Configuration 3. Establish a VEXnet Link between the Cortex and Remote Control

VEXnet Configuration 4. Insert VEXnet Keys and Test!

Remote Control Reset The VEXnet Joysticks should be recalibrated before use The VEXnet Remote Control may not have its joystick values calibrated correctly, since it’s last firmware download The Cortex and VEXnet Joysticks must be synched before the joystick values can be calibrated

vexRT[] Command The vexRT[] Command allows you to access any of the values from the VEXnet Joysticks The values from the joystick axis are identified by the the letters “Ch” + the number closest to them Channel variable names: Ch1 - X-Axis - Right Joystick Ch2 - Y-Axis - Right Joystick Ch3 - Y-Axis - Left Joystick Ch4 - X-Axis - Left Joystick

vexRT[] Command The buttons are identified by the letters “Btn” + the number closest to it + the letter etched into it Button variable names: Btn5U - Button group 5 - "U" (up) Btn5D - Button group 5 - "D" (down) Btn6U - Button group 6 - "U" (up) Btn6D - Button group 6 - "D" (down) Btn7U - Button group 7 - "U" (up) Btn7D - Button group 7 - "D" (down) Btn7L - Button group 7 - "L" (left) Btn7R - Button group 7 - "R" (right) Btn8U - Button group 8 - "U" (up) Btn8D - Button group 8 - "D" (down) Btn8L - Button group 8 - "L" (left) Btn8R - Button group 8 - "R" (right)

Joystick Value Mapping Direct Value Mapping Values from the remote control are directly used to control the motors (1:1 ratio)

Joystick Value Mapping Indirect Value Mapping Values from the remote control are modified before being used to control motors Can make the robot easier to control Appropriate in situations that require more “delicate” movements Notice: the robot reads the right side of the equal sign first

ROBOT Motion Commands that cause the entire robot to perform a behavior arcadeControl() tankControl()

Tank Control One Joystick/Channel controls the right side of the robot; another joystick/channel controls the other side of the robot

Arcade Control One Joystick/Channel controls the forward/backward movement of the robot; another joystick/channel controls the turning of the robot

Remote Control Follow along with the Remote Control > Joystick Mapping Videos for Review

Remote Control Exercise 1 Part 1: Write a program that uses the left joystick to control the power level of the left motor, and the right joystick to control the power level of the right motor. The program should run forever. Part 2: Modify your program so that 1/3 of the left and right joystick values are applied to the motors.

Advanced Remote Control More loop control please? Is remote controlling the robot forever always appropriate? Question: Where would the wait statement go if we wanted the robot to be remote controlled for a controlled amount of time? Answer: Nowhere! We need something else. Solution: Timers Can be thought of as internal stopwatches (4 available) Like encoders, timers should be “cleared” anytime before they are used Watch where you clear them!

Timers Standard ROBOTC: Natural Language:

Timers Follow along with the Remote Control > Timers Videos for Review

Button Control Wasting Time? Wait for a Remote Control Button press The time it takes to turn on the VEX Cortex and start using the Joysticks is wasted time. Could we make the robot wait to start it’s timer until we were ready? Any ideas? Wait for a Remote Control Button press The robot won’t start the timer until we say so The robot also can’t move until we says so Could this idea also be used to make a “more friendly” start button on a non- remote controlled robot? Other ideas of how to improve remote control? Use the buttons to initiate common actions Turn 90 degrees, move straight forward, ect

Button Control Attach the Arm! Use the buttons to control the arm The VEXnet Joystick buttons send values of 0 or 1

Button Control Standard ROBOTC Version

Button Control Natural Language Version

Buttons Follow along with the Remote Control > Buttons Videos for Review

Homework VCVT Videos Challenges: Remember to Pseudocode Watch remaining Remote Control Videos Challenges: RoboDunk (Autonomous version) Round-Up Turn Buttons Investigation Remember to Pseudocode Day 3 Practice Quiz Remember to shut off your robot and remote control when they’re not in use!