Difference between revisions of "Java"
Dsteinmark (talk | contribs) |
Dsteinmark (talk | contribs) |
||
| Line 19: | Line 19: | ||
* [http://first.wpi.edu/FRC/roborio/release/docs/java/ Java/WPI Lib Reference] | * [http://first.wpi.edu/FRC/roborio/release/docs/java/ Java/WPI Lib Reference] | ||
* [https://mort11.com/downloads/mentor.wiki/Head_First_JAVA_2ed.pdf Head First Java, 2nd Ed] A book on Java (pdf) | * [https://mort11.com/downloads/mentor.wiki/Head_First_JAVA_2ed.pdf Head First Java, 2nd Ed] A book on Java (pdf) | ||
| − | * [https://resources.oreilly.com/examples/9780596009205.git | + | * [https://resources.oreilly.com/examples/9780596009205.git Code for the ''Head First Java'' book, above] |
* [http://wpilib.screenstepslive.com/s/currentCS/m/java/l/272787-frc-java-wpilib-api-documentation FRC/WPI About local javadocs] | * [http://wpilib.screenstepslive.com/s/currentCS/m/java/l/272787-frc-java-wpilib-api-documentation FRC/WPI About local javadocs] | ||
Revision as of 06:41, 24 October 2018
About
Java is the language we use primarily to program the FRC robots. It is a general purpose, object oriented programming language that can do almost any variety of tasks. It works hand-in-hand with WPI Lib to control the robot.
WPI Lib is the set of libraries - low level software designed to control the hardware - that interfaces with sensors and outputs, and interfaces with elements of the FRC Field such as start and stop signals. Our Java programs need to include the WPI libraries and make calls to the Apllication Programming Interface (API) WPI Lib provides.
Installing
Or manually with another IDE:
- Get JDK 8
- Get Java
- WPILib/FRC Plug-in for IntelliJ if using IntelliJ you may need this?? (TBD)
Documents, Guides, and References
- FRC/WPI Java Programming Full fledged menu of resources from the WPIlib folks.
- Java/WPI Lib Reference
- Head First Java, 2nd Ed A book on Java (pdf)
- Code for the Head First Java book, above
- FRC/WPI About local javadocs
- FRC Java Plugin Changelog Useful to see what has changed in WPI lib since last year.
Tutorial Videos
FRC Java Command-based Programming Tutorial Playlist (1.5 hrs)
- FRC Java Programming Tutorial Part 1: Project Setup
- FRC Java Programming Tutorial Part 2: Basic Drivebase
- FRC Java Programming Tutorial Part 3: Setting up Tank Drive Controls
- FRC Java Programming Tutorial Part 4: How to use TalonSRXs
- FRC Java Programming Tutorial Part 5: Version Control
- FRC Java Programming Tutorial Part 6: WPILIB PID
Note: when watching the videos, you should stop and look through the code that is discussed. Some minor items (such as imports) are glossed over. For example, if you have unreferenced calls in your code, compare the code on screen with what you have - you may have to import an additional library. Hover over unresolved items. Usually, you want to import the correct library.