FRC Java for Robotics Introduction Team 1279 ColdFusion January 8, 2011.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Made with love, by Zachary Langley Applets The Graphics Presentation.
Java Workshop. Quick java review Goal: We want the application to tell us what the nth fibonacci number is. Components needed to achieve the goal: A Scanner.
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.
INHERITANCE BASICS Reusability is achieved by INHERITANCE
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
2/18/2008ITK 1681 Feb. 20, Wed. 8:00 – 9:30 pm STV Closed book, notes, and no computer is allowed. 2.Everyone is allowed to bring a self- prepared.
US First Kickoff 2014 Software Programming (And Control System) Daniel Kohn University of Memphis.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
Well-behaved objects 4.0 Testing. 2 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main concepts to.
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
CS 225 Lab #2 - Pointers, Copy Constructors, Destructors, and DDD.
CS 2511 Fall  Windows:  Start->Specialized Academic Software- >Programming Languages->NetBeans->NetBeans IDE x.y.z  where x.y.z is a version.
A New Soar Debugger In Java Douglas Pearson
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
Brad Miller Associate Director WPI Robotics Resource Center Programming the 2009 FRC Control System.
Intro C++ Programming WINDSOR-ESSEX FIRST ROBOTICS
Programming an FRC Robot Choosing a Language 1. INDEX The Programing Languages and their Environments The Three Major Enviroments Java with the NetBeans.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
US First Kickoff 2013 Software Programming (And Control System) Daniel Kohn University of Memphis.
US First Kickoff 2012 Software Programming (And Control System) Daniel Kohn University of Memphis.
From BlueJ to NetBeans SWC 2.semester.
Programming Fundamentals 2: Background/ F II Objectives – –give a non-technical overview of Java Semester 2, Background.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I First Semester,
Understanding Eclipse Development Environment Hen-I Yang July 7, 2006
Programming Progamz pls. Importance VERY IMPORTANT.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
IDEs Department of Information Systems and Computer Science Ateneo de Manila University.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Java and the Kinect FRC 2012 Kickoff Team 1279 ColdFusion January 7, 2012.
Welcome To Eclipse. Basic Concepts Workspace – directory where your projects are stored –Projects grouping of related works –Resources generic term to.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Refactoring1 Improving the structure of existing code.
CS Software Studio Java Lab 1 Meng-Ting Wang PLLAB, Computer Science Department, National Tsing-Hua University.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
Eclipse 24-Apr-17.
Java Coding Environment Installation & Execution guide 컴퓨터 프로그래밍 II Korea Univ.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
Jon Cardwell Red Alert Robotics Team 1741 October 24, 2015.
Session 11 Intro to FRC API.
NETBEANS DEBUGGER.  To create a breakpoint place the cursor at the desired location.  Go to the Run -> toogle line Breakpoint or Ctrl +F8. It creates.
Page 1 – Autumn 2009Steffen Vissing Andersen SDJ I1, Autumn 2009 Agenda: Java API Documentation Code Documenting (in javadoc format) Debugging.
Computer Science I Programming in Java (programming using Processing IN Java, using IntelliJ IDE) Classwork/Homework: copy your Processing projects over.
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila.
Intro to. Contents These slides describe how one can obtain (download) and use eclipse to build, run, and debug basic Java programs.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
Introduction to Programming with Java Presented by.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
Slide 1. What's New in NetBeans IDE 7.1 Name Title.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
ATS Application Programming: Java Programming
Appendix A Barb Ericson Georgia Institute of Technology May 2006
PRG 421 GUIDE Lessons in Excellence -- prg421guide.com.
Lesson 4: Overall Review and Assessment
Lesson 6: Command-based (continued)
Android Programming OnBot Java.
LCC 6310 Computation as an Expressive Medium
Review of Previous Lesson
Debugging.
Java Coding Environment Installation & Execution guide
Workshop for Programming And Systems Management Teachers
Presentation transcript:

FRC Java for Robotics Introduction Team 1279 ColdFusion January 8, 2011

NetBeans IDE Full featured development environment –Edit –Build –Debug –Deploy Bundled with the latest Java SE JDK FRC plug-ins for WPILibJ

Advantages Widely Used –AP Test means school support Many Resources –Books –Websites –Mentors Economical –Free and can run on older hardware under Linux Early in its life

Disadvantages New to FIRST –Still Bugs & Rough Edges –Teams have, at most,1 season of experience Fewer Robotics resources –Not much existing code –CAN not up to C++ Not 100% standard Java –Based in Java ME –No formatted output (yet)

Sample Code Walk-through Example from SimpleRobotTemplate –Check IterativeRobot too –Good Sample code Described in the Getting Started Guide –Still a typo or two –Suggest everyone new try it

Sample Code I The File Environment Package groups related classes together package edu.wpi.first.wpilibj.templates; Import pulls in other classes import edu.wpi.first.wpilibj.RobotDrive; import edu.wpi.first.wpilibj.SimpleRobot; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.Joystick;

Sample Code II Your Robot Class Derived from the sample Don’t change the name! public class Team1279Robot extends SimpleRobot { private RobotDrive drivetrain; private Joystick leftStick; private Joystick rightStick;

Sample Code III The Constructor Called Once when Class object is Instantiated Create and Initialize Instance Objects and Variables public Team1279Robot() { // create RobotDrive drivetrain = new RobotDrive(1, 2); // and joysticks leftStick = new Joystick(1); rightStick = new Joystick(2); }

Sample Code IV Methods Called by FMS Don’t Change These! Called by the Field Management System public void autonomous() { public void OperatorControl() {

Sample Code V autonomous() for (int i = 0; i < 4; i++) { //note turning rate and size of square is different //for every robot, adj delay, speed,turn for yours drivetrain.drive(0.5, 0.0); //50% fwd 0% turn Timer.delay(2.0); // wait 2 seconds drivetrain.drive(0.25, 0.75); //25% fwd 75% turn Timer.delay(1.0); // wait 1 second } drivetrain.drive(0.0, 0.0); //0% fwd 0% turn (stop)

Sample Code VI operatorControl() while (isOperatorControl() && isEnabled()) { // drive w/joysticks drivetrain.tankDrive(leftStick,rightStick); Timer.delay(0.05); }

Javadocs

Debugging println Output –Console –Debugger –Files NetBeans Debugger –Main Project only –Set at least 1 breakpoint –Download debug code –Debugger now attaches automatically

Resources The reference guide for this presentation on the NJ/NY FIRST website WPI website FIRST website