ROBOTC for VEX Online Professional Development

Slides:



Advertisements
Similar presentations
Engineering Roles We will be forming groups of 3 students
Advertisements

Automation and Robotics
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
VEX Robotics Platform and ROBOTC Software Introduction.
Photos and Sensor Instructions
VEX Robotics Platform and ROBOTC Software
Connecting VEX and ROBOTC
Testbed: Exercises.
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
Program ultrasonic range sensor in autonomous mode
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
ROBOTC for VEX On-Site Professional Development
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Introduction to the VEX ® Robotics Platform and ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
VEX Robotics Design System Sensors A Brief Overview
Programming Design ROBOTC Software Principles of Engineering
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Photos and Sensor Instructions
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
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 Testbed © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
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. Homework Questions Thoughts? Questions?
Introduction to VEX® components
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.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
Programming Design ROBOTC Software Principles Of Engineering
Electrical Engineer Responsibilities
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
VEX® Robotics Platform and ROBOTC Software
NXT Mindstorms Kit Programming
VEX® Robotics Platform and ROBOTC Software
ROBOTC for VEX Online Professional Development
ROBOTC for VEX Online Professional Development
Electrical Engineer Responsibilities
ROBOTC for VEX Online Professional Development
VEX Robotics Platform and ROBOTC Software
ROBOTC for VEX On-Site Professional Development
Robotics Programming Using Shaft Encoders
Electrical Engineer Responsibilities
Automation and Robotics
Programming Design ROBOTC Software Computer Integrated Manufacturing
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Electrical Engineer Responsibilities
RobotC Sensors.
Movement using Shaft Encoders
RobotC Sensors.
Automation and Robotics
Introductory Presentation
TECH 1 BAMS Technology Education
VEX® Robotics Platform and ROBOTC Software
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
Robotics Programming Using Shaft Encoders
Photos and Sensor Instructions
Robotics Programming Using Shaft Encoders
Automation with RobotC
Robotics Programming Using Shaft Encoders
Obstacle Detection.
Programming Design ROBOTC Software Principles of Engineering
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Presentation transcript:

ROBOTC for VEX Online Professional Development

Student: “My motor should spin forward for 3 Student: “My motor should spin forward for 3 seconds, stop for 2 seconds, then reverse for 3 seconds, but it never stops in the middle.”

Sensor Information: Touch Sensors

Touch Sensors Touch Sensor Check How they work Two Types Plugged into Digital 6 on the Cortex How they work Digital sensor - Pressed or Released 1 = Pressed, 0 = Released Watch out for “bouncing” Two Types Limit Switches (top) Bumper Switches (bottom) Setting them up ROBOTC Motors and Sensors Setup window Using them The SensorValue[] command untilTouch(), untilRelease(), until Bump()

Move Forward until Pressed

Natural Language - Until Commands that allow you to create behaviors where the robot acts “until” a certain event untilTouch() untilRelease() untilBump()

Touch Sensors Other Properties Limitations Limit Switch arm can be bent to create a more ideal “hit area” Both sensors spring back to “open” position Limitations Watch out for “bouncing”. As the sensor is pressed or released, it may bounce between 0 and 1 very briefly and quickly. A very brief wait can be inserted as part of the untilBump() command, or after the untilTouch() and untilRelease() commands to reduce the bouncing effect:

Natural Language 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 limit switch?

Additional Resources

Sensor Information: Potentiometer

Potentiometers Potentiometer Check Analog Port 6 on Cortex How they work Analog sensor Measures rotation of a shaft between 0 and ~265 degrees Cortex returns values 0 - ~4095 Using them The SensorValue[] command untilPotentiometerGreaterThan, untilPotentiometerLessThan NL commands

Potentiometers Other Properties Limitations Internal mechanical stops prevent the potentiometer from turning a full revolution. Limitations Caution: Excess torque against the internal mechanical stops (can be caused by hand or by a VEX motor) will cause them to wear away. The potentiometer will continue to function, but will have a “dead zone” where the mechanical stops were, where no new values are sent. Switching the direction the potentiometer is facing will also switch the direction it “counts”. For example: counter-clockwise turns will count 0 to 4095 on one side; on the other counter-clockwise turns will count 4095 – 0.

Potentiometers

Natural Language - Until Commands that allow you to create behaviors where the robot acts “until” a certain event untilPotentiometerGreaterThan() untilPotentiometerLessThan()

Natural Language Autonomous Arm Control

Potentiometers Variable Speed Program Use the rotation of the potentiometer to control how fast the robots motors spin

Advanced Arm Control Use the Touch Sensor and Potentiometer to control the minimum and maximum values of the arm. Follow videos in the VEX Cortex video Trainer.

Sensor Information Ultrasonic Rangefinder

The Ultrasonic Rangefinder Ultrasonic Rangefinder Check Input into Digital Port 8 (Always lower port number) Output wire plugged into Digital Port 9 How they work Similar to how bats and submarines work Digital sensor – but returns distance values between 0 & 648 cm (Can also return values of -1 or -2) Cortex resolution can be in inches, cm, or even mm 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 untilSonarLessThan(), untilSonarGreaterThan()

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

Natural Language - Until Commands that allow you to create behaviors where the robot acts “until” a certain event untilSonarGreaterThan() untilSonarLessThan()

Natural Language Forward until Near

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

Straight until Near