ROBOTC for VEX On-Site Professional Development

Slides:



Advertisements
Similar presentations
While Loops and If-Else Structures
Advertisements

LabView Basics.
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
Testbed: Exercises.
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
Program ultrasonic range sensor in autonomous mode
ROBOTC for VEX On-Site Professional Development
Introduction to the VEX ® Robotics Platform and ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
Obstacle Detection Introductory Presentation. Opening Activity If you were blindfolded, what senses would you use to find things in the room?
Programming Design ROBOTC Software Principles of Engineering
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
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?
Introduction to VEX® components
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.
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
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.
Programming Design ROBOTC Software Principles Of Engineering
VEX® Robotics Platform and ROBOTC Software
NXT Mindstorms Kit Programming
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
VEX® Robotics Platform and ROBOTC Software
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
Robotics Programming Using Shaft Encoders
ROBOTC for VEX Online Professional Development
Informational Meeting
Programming Design ROBOTC Software Computer Integrated Manufacturing
RobotC Sensors.
Movement using Shaft Encoders
RobotC Sensors.
Introductory Presentation
Automation and Robotics
Introductory Presentation
Introductory Presentation
TECH 1 BAMS Technology Education
While Loops and If-Else Structures
VEX® Robotics Platform and ROBOTC Software
VEX® Robotics Platform and ROBOTC Software
While Loops and If-Else Structures
Programming Design ROBOTC Software Principles Of Engineering
While Loops and If-Else Structures
While Loops and If-Else Structures
VEX® Robotics Platform and ROBOTC Software
While Loops and If-Else Structures
if-else Structures Principles of Engineering
Automation with RobotC
VEX® Robotics Platform and ROBOTC Software
Robotics Programming Using Shaft Encoders
Robotics Programming Using Shaft Encoders
Introductory Presentation
While Loops and If-Else Structures
Automation with RobotC
Robotics Programming Using Shaft Encoders
Obstacle Detection.
While Loops and If-Else Structures
Programming Design ROBOTC Software Principles of Engineering
While Loops And If-Else Structures
Presentation transcript:

ROBOTC for VEX On-Site Professional Development

Advanced Remote Control

Advanced Remote Control More loop control please? Is remote controlling the robot forever always appropriate? Next Challenge: Mine Removal Challenge 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

Advanced Remote Control Wasting Time? The time it takes to turn on the VEX and get situated could be used to score points, but is wasted. 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 Program Flow Trace Could this idea also be used to make a “more friendly” start button on a non-radio controlled robot? Other ideas of how to improve remote control? Use the buttons to initiate common actions Turn 90 degrees, move straight forward, ect

Advanced Remote Control Use the buttons to control the arm The VEXnet Remote Control buttons send values of 0 or 1

Sensing

Sensor Information: Touch Sensors

Touch Sensors Touch Sensor Check How they work Setting them up Limit Switch plugged into Digital Port 6 Bumper Switch plugged into Digital Port 11 How they work Digital sensor - Pressed or Released Watch out for “bouncing” Setting them up ROBOTC Motors and Sensors Setup window Using them The SensorValue[] command

Move Forward until Pressed

Touch Sensors Start Button Remember how we used the Remote Control button to start the timer portion of the program. How would we implement the same thing with the bumper switch?

Sensor Information: Potentiometer

Potentiometers Potentiometer Check How they work Setting them up Plugged into Analog Port 3 How they work Analog sensor Measures absolute rotation of a shaft between 0 and ~265 degrees Returns values 0 – ~4095 Internal mechanical stops Setting them up ROBOTC Motors and Sensors Setup window Using Analog and Digital Sensors Using them The SensorValue[] command

Potentiometers

Advanced Arm Control

Sensor Information Ultrasonic Rangefinder

The Ultrasonic Rangefinder Ultrasonic Rangefinder Check Input wire plugged into Digital Port 8 Output wire plugged into Digital Port 9 How they work Similar to how bats and submarines work Digital sensor – but returns distance values in inches, centimeters, or millimeters on the Cortex Setting them up ROBOTC Motors and Sensors Setup window Using them Be careful not to use them immediately as your program starts – they take time to initialize and will return negative values The SensorValue[] command

Ultrasonic Rangefinder Other Properties The Ultrasonic Rangefinder is able to detect objects in a “cone” field of view. As objects get further away, the sensor is able to detect them further away from the center of the sensor. The sensor bases distance calculations off of sound waves, which means that some objects may not be detectable: soft objects that absorb sound, sharp objects that deflect sound, etc. Do not use the ultrasonic sensor as the very first command in your code. Until the first sound echo returns to the sensor, it will have a value of -1. A simple delay at the beginning of your program solves this.

Forward until Near

The Ultrasonic Rangefinder Forward until Near Move forward until the robot is “near” an object, then stop Automatic Pick-up Straight Forward until Near + picking up the mine Optional: Assign to a button on the Remote Control

The Ultrasonic Rangefinder Forward/Straight until Near Move straight forward until the robot is near an object, then stop Follow along with videos in VCVT Automatic Pick-up Straight Forward until Near + picking up the mine Optional: Assign to a button on the Remote Control

VEX Robotics Competition Programming

VEX Robotics Competitions Official VEX Competitions utilize special Field Control Hardware to enable and disable robots

Competition Templates ROBOTC is fully legal in VEX Competitions You must program using the built-in templates Competition Template Driver Skills Template

Competition Template Pre-autonomous code goes here – clear encoders, ect Autonomous code goes here Remote Control code goes here

Testing Competition Code The ROBOTC Competition Control Debug Window simulates the Field Control Hardware, so you can test your code

Additional Sensors

Sensor Activities Finish the Automatic Pickup Behavior Add code to automatically score the ball Quick-Tap Challenge Review Sensing Videos With a Virtual Robot: Sensing > Robocci Sensing > Speed of Sound Sensing > Robo-Dunk 2