Java Programming The Ponytail Posse - FTC #8808 9/12/15.

Slides:



Advertisements
Similar presentations
US First Robotics Lab View Tutorials Jim Thomas Lawrence Berkeley National Laboratory Team 496 Port Jeff Powerhouse.
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.
EducateNXT Enter the name “Sound Graphing” for your experiment. Real-time Data Logging Click the Switch to NXT Data Logging icon in the top-left corner.
Team 5220 Roboknights. Outline  Getting Started  Hardware Setup/Wiring  Software Setup/Pragmas  Programming with RobotC  Grammar/Syntax  Basic Statements.
Wait, sound sensor >70, Port 2 Flowchart – Heartbeat 1 Start Motor A, Move Backward, 1/3 Rotation, Power 20 Wait, 1 Second Sound Sensor (Port 2) Less than.
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.
RobotC For Beginners Tyler Lutz and Keaton Bonds DRSS Enterprise.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Coding for the FIRST Tech Challenge: RobotC Presented by: Audrey Yeoh Acknowledgements: Team Unlimited FTC 0001.
Coding for the FIRST Tech Challenge: RobotC
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
LabVIEW Workshop September 26, 2009 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.
The New FTC Platform (Connecting your legacy hardware)
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
Robot C Set-up FTC Clinic Nov Patrick Michaud & RobotC Curriculum
FTC New Platform Programming Workshop in Android Studio
RobotC Advanced Concepts SSI Robotics September 7, 2013 Capitol College.
Making your Robot Move Motorbolts. Notes This presentation will be available on the High Tech Kids’ website: hightechkids.orghightechkids.org For more.
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Programming Design ROBOTC Software Principles of Engineering
FRC Robot Programming 1.PID Continued 2.Downloading and Deploying Code 3.Program a 2012 Robot from Spec Basic code For FIRST Robotics.
ALL TERRAIN ROBOT 1 Wilmer Arellano. The Client’s Need  Verbally presented at class time.  Modify the All Terrain Manual Robot into an autonomous Gripper.
Wall Encounter By Made easy by Dwayne Abuel.
2008 SBPLI/FIRST Programming Workshop Tom Boehm Patchogue Medford High School, Team 329 Motorola Inc. Mark McLeod Hauppauge High School Team 358 Northrop.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Part III Robot Drive. Robot Main.vi The main body of your code: accesses all of the other programs in your project A big loop! Do not add any more loops.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
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.
Vex Robotics program three: using motors and sensors together.
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
By Joshua Shaw.  We have previously added a While Loop  We are now going to use it for programming the robot  We have also added two motor programs.
PROGRAMMING FTC ROBOTS WITH ANDROID STUDIO EAGLE ROBOTICS TEAM 7373 JORDAN MOSS AND BRIAN BAARS.
How To Remove Uploaded YouTube Video?. YouTube Tech Support Number
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Introduction to Programming in RobotC
OpModes in FTC Eric Golde.
If you want to swing an robot arm or …
FTC Driver Station Setup and Operation Mike Zook 20-Sep-2016.
Introduction to Autonomous Programming
ROBOTC for VEX Online Professional Development
Robotics Programming Using Shaft Encoders
FTC Driver Station Setup and Operation Mike Zook 20-Sep-2016.
StartStruck in a Virtual World
Programming FTC Robots with Android Studio
GETTING STARTED ALL YOU NEED TO KNOW TO MAKE YOUR ROBOT MOVE
StarStruck in a Virtual World: Fantasticbot Version
Programming Design ROBOTC Software Computer Integrated Manufacturing
Basics for Robotics Programming
Programming Workshop Quixilver 8404.
Movement using Shaft Encoders
Programming Autonomy By Joshua Shaw.
Controlling YOUR ROBOT
Line Following Behavior
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Training 11/11/16 Robot Code (WPILib).
Programming a Servo By Joshua Shaw.
Introduction to RobotC
Block Programming Hello my name is Stephanie. I have been apart of FIRST for 6 years and have 3 years of programming experience. I am currently a member.
Android Programming OnBot Java.
Introduction to Software Planning and Design
Elecbits Project: IoT based Smart Dustbin
Programming - Buttons Intro to Robotics.
if-else Structures Principles of Engineering
Programming - Buttons Intro to Robotics.
Remote Control For this activity we will use the Squarebot
Robotics Week 2 Getting Started Using the Display
Compiled from various Internet sources Presented by Mr. Hatfield
Programming Design ROBOTC Software Principles of Engineering
Presentation transcript:

Java Programming The Ponytail Posse - FTC #8808 9/12/15

Outline How to make teleop work “out of the box” How to make your own teleop Autonomous basics Source code control Resources

Making TeleOp Work Out of the Box K9TeleOp Initial robot configuration

K9TeleOp DC motor controls: left toggle controls the wheels Up = forward Down = backward Left = left Right = right Servo motor controls: A, B, X, Y buttons X and B = claw Y and A = arm DC motors Servo

Making Your Own TeleOp 1.Reconfigure robot 2.Duplicate K9TeleOp (right click → refactor → copy)

Making Your Own TeleOp 1.x 2.x 3.Enter your new teleop in the FtcOpModeRegister 1.Link phone configuration to program through HardwareMap

HardwareMap After configuring the hardware on the phone, you need to access it in the program. HardwareMap is a link that allows the program to access the configuration. ROBOTC: JAVA: ↑ variable you use for programming ↑ name you put in the phone

HardwareMap Sensors hardwareMap.opticalDistanceSensor hardwareMap.touchSensor hardwareMap.accelerationSensor hardwareMap.compassSensor hardwareMap.gyroSensor hardwareMap.irSeekerSensor hardwareMap.lightSensor hardwareMap.ultrasonicSensor hardwareMap.voltageSensor Example:

Making Your Own TeleOp ROBOTCJAVA initializeRobot()init() while(true)loop() init() Includes links between hardware configuration and program (hardwareMap) Initializes robot at the beginning loop() Contains entire teleop program

Motor Control ROBOTCJAVA Setting Motor Power motor[leftDrive]=100; // ­100 to 100 Setting Motor Power leftDrive.setPower(1); // ­1 to 1 leftDrive.setTargetPosition(4000); // new! runs to a particular encoder setting! Setting Servo Position servo[goalGrabber]=128; // 0 to 255 Setting Servo Position goalGrabber.setPosition(0.5); // 0 to 1

Gamepad Control ROBOTCJAVA Joystick Input joystick.joy1_x1,.._y1,.._x2,.._y2 // ­128 to 127 joy1Btn(1) // 1­12 joystick.joy1_TopHat // ­1, 0­7 Gamepad Input gamepad.left_stick_x, _y, (or right_) // ­1 to 1 // y is ­1 at top, +1 at bottom!! gamepad1.left_trigger, _bumper, _stick_button gamepad1.a,.b,.x,.y,.start,.back gamepad1.dpad_up, _down, _left, _right // combine with OR(|) for diagonals

Variables and Control ROBOTCJAVA Primitive Variables and Control Basically the same int loopCount; float driveSpeed; loopCount=10; driveSpeed=1.0; if (...) { // stuff to do here } while (...) { // stuff to do here } Primitive Variables and Control Basically the same int loopCount; float driveSpeed; loopCount=10; driveSpeed=1.0; if (...) { // stuff to do here } while (...) { // stuff to do here }

Examples ROBOTCJAVA Examples motor[leftDrive]=driveSpeed * joystick_joy1_y1; if ( joy1Btn(3) ) { servo[goalGrabber]=255; } Examples leftDrive.setPower(driveSpeed * gamepad1.left_stick_y); if ( gamepad1.a ) { goalGrabber.setPosition(1.0); }

Autonomous LinearOpMode ROBOTCJAVA main()runOpMode() waitForStart() waiting for FCSwaiting for the “start” button on the driver station wait (milliseconds) - not needed to run motor sleep (milliseconds) - needed to run motor motor = 0setPowerFloat() while(true)OpModeIsActive() You need either “sleep()”, “OpModeIsActive()”, or “waitOneHardwareCycle()” in every step of your program.

Telemetry Telemetry data is sent from the robot to the driver station Program in Android Studio Bottom left corner of driver station

Source Code Control Provides a way to experiment with your code Check in after every change Branch off to try something new Either merge or delete SourceTree

Resources Android Studio (& more): AppInventor: Java Tutorials: RobotC → Java (Cheer4FTC): SourceTree: Find this presentation at resourceswww.theponytailposse.com/team- resources

Thanks for listening! Questions ?