Skip to content

Guide to Controls

Getting Started with Java Resources for New FRC Programmers

You can always start with the official WPILib Documentation. I found it confusing years ago; too much information and too many "snippets" that never got cleaned up or explained properly. It's improved greatly over the years, but we thought we would put something together to help teams get started as there are many things NOT covered by WPILib docs.

Key Java Concepts to Focus On

  1. Basic Syntax

  2. Variables and data types

  3. Control flow (if/else, loops)

  4. Methods and parameters

  5. Basic operators

  6. Object-Oriented Programming

  7. Classes and objects

  8. Inheritance

  9. Encapsulation

  10. Polymorphism

  11. Common Data Structures

  12. Arrays

  13. ArrayLists

  14. HashMaps

Interactive Learning Platforms

  1. Codecademy's Java Course

  2. Best starting point for complete beginners Highly Recommended

  3. Interactive lessons

  4. Free basic course, Pro version available

  5. Note: Schools using "Clever" login may get PRO account free

  6. Oracle's Java Tutorials

  7. Comprehensive official documentation, good reference material

  8. Focus on:

    • Object-Oriented concepts

    • Basic language features

    • Essential classes

Video Tutorials

  1. FRC Specific Java

  2. FRC 0 to Robot by Sean Sun

    • Excellent for FRC beginners

    • Focuses on robot programming concepts

    • Clear explanations with examples

  3. General Java Fundamentals

  4. MIT OpenCourseWare - Introduction to Programming in Java

    • University level content

    • Well-structured lessons

    • Includes lecture notes and assignments

Practice Exercises

  1. CodingBat Java

  2. Short practice problems

  3. Instant feedback

  4. Gradually increasing difficulty

  5. Practice-It

  6. Java practice problems

  7. Based on University of Washington curriculum

  8. Covers basic to advanced concepts

FRC-Specific Resources

  1. WPILib Example Projects

  2. Study and modify existing robot code

  3. Examples for different robot functions

  4. Command-based programming examples

  5. FRC Java Programming PDF

  6. Comprehensive guide for FRC Java

  7. Covers both Java basics and FRC-specific concepts

  8. Good reference material

Important Tips for Beginners

  1. Start Simple

  2. Begin with basic Java syntax

  3. Move to FRC-specific concepts only after understanding basics

  4. Don't try to understand everything at once

  5. Practice Regularly

  6. Write code daily, even if just for 30 minutes

  7. Start with simple programs

  8. Gradually increase complexity

  9. Use Debug Tools

  10. Learn to use VS Code debugger

  11. Practice reading error messages

  12. Use System.out.println() for debugging

  13. Read Other Teams' Code

  14. Study code from successful teams

  15. Learn different approaches to similar problems

  16. Don't just copy - understand why things are done certain ways

Github and Git

Github and Git are NOT requirements for Java or other programming in FRC, but they can be incredibly helpful. Git is like a time machine for your code and documents. Imagine you're writing a story, and every time you make significant changes, you want to save a snapshot of your work. Git does exactly that for programming projects (though it can be used for any type of files). It keeps track of every change you make, letting you:

  • Save different versions of your work

  • Go back to earlier versions if something goes wrong

  • Work on different versions simultaneously (like having a "draft" and a "final" version)

  • See what changed between versions, when it changed, and who changed it

GitHub, on the other hand, is like a social network for Git projects. It's a website where you can:

  • Store your Git projects online (like storing your documents in Google Drive)

  • Share your work with others

  • Collaborate with other people on the same project

  • Find and use code that other people have shared

  • Track issues and manage projects

The main terms you'll hear:

  • Repository (or "repo"): Your project folder and all its history

  • Commit: A snapshot of your changes

  • Branch: A separate version of your project (like a draft chapter of your story)

  • Push: Uploading your changes to GitHub

  • Pull: Downloading changes from GitHub

  • Clone: Making a copy of a project to work on

Learn how to create a public repository at Github, post your code and ask other teams to help you with your code if you get stuck!

Learn Git | Codecademy is helpful for concepts, but you DO NOT have to learn the command line for Git. Use the Github Desktop client to commit, push, and pull code.

Software Installation & Setup

Every season requires updates to both your computer software and robot code. This guide covers essential software updates for the FRC season that we, FRC 3603, use each season.

  1. Start with primary installations

  2. Install the secondary installations

  3. Update motor and controller firmware

  4. Install additional software tools as needed

  5. Verify all installations and updates

  6. Check for updates throughout the season!

Primary Installations

These are absolutely needed for every team

Must be downloaded annually after the game's release each January. Links will be updated then.

Capabilities Provided:

  • Update RIO Image or RIO2 Image

  • Configure Radio

  • Run Driver's Station

  • Write code for the current season

FRC Game Tools

WPILib Suite

Secondary Installations and Firmware Updates

These are likely needed by every team

CTR Electronics

Update firmware for any of the following you are using:

  • [ ] Kraken & Falcon Motors -v6

    • [ ] Pigeon - v6

    • [ ] Talon SRX Controllers - v5

    • [ ] PDP (Power Distribution Panel) unlikely you have one

REV

  • [ ] Install/Update REV Hardware Client. Update firmware for any of the following you are using:

    • [ ] NEO and similar Motors

    • [ ] Spark MAX Controllers

    • [ ] PDH (Power Distribution Hub)

Additional Software

These may not be needed by every by team

Vendor Dependencies

After setting up a new code project each season, you need to (re)add any vendor dependencies a.k.a. Vendor Deps. Robot component manufacturers will often have specialized code libraries to use or enhance the use of their hardware. To use them you have to add their vendor deps. Here are some of the more common vendors.

CTRE

REV

PathPlanner

Choreo

A relatively new kid on the block. We haven't used it yet, but there seems to be some excitement online

Time of Flight Sensor

This is meant as a quick reference. For full instructions, please see Installing 3rd party libraries.

Programming Resources

Command-Based Programming

  1. Command-Based Programming (WPILib)

  2. FRC 0 to Autonomous: Command-Based Programming

Motion Control

  1. Motion Magic and Motion Profiling (CTRE)

  2. Trapezoidal Motion Profiles (WPILib)

  3. PID Theory and Robotics Explained

Vision Systems

  1. Limelight Documentation

  2. PhotonVision Documentation

  3. AprilTag Introduction

Example Code & References

Code Examples

  1. WPILib Example Projects

  2. CTRE Phoenix Examples

  3. REV Robotics Example Code

Community Resources

  1. Chief Delphi Programming Forum

  2. FRC Discord

These barely scratch the surface of what's available at Chief Delphi and Github. Chief Delphi has specific threads each year about the "Open Alliance" and "The Every Bot."

AI chat bots, like Claude and ChatGPT are also changing how we do programming research.

Pre-Competition Checklist

Hardware

  1. Cables, Cords and adapters

  2. USB A to B cable for RoboRIO; a.k.a. printer cable 10+ feet

  3. Long ethernet cable for practice field (50ft)

  4. Spare ethernet cables

  5. USB to Ethernet port if your laptop doesn't have an ethernet port

  6. USB hub for additional peripherals

  7. Cable ties and labels for cable management

  8. Power and Batteries

  9. Power cords Driver Station laptop and others

  10. At least 3 fully charged robot batteries

  11. Battery voltage checker

  12. Robot Battery charger, power strips and extension cord

  13. Secure battery strap/mount replacements

  14. Basic Tools and Spares

  15. Allen wrench/hex key set (metric and standard)

  16. Screwdrivers (Phillips and flathead)

  17. Pliers and wire strippers

  18. Electrical tape and zip ties

  19. Spare screws, nuts, and washers

  20. Spare motor controllers

  21. Spare pneumatic tubing and fittings

  22. Spare wheels/belts/chains

  23. Basic soldering equipment

  24. Spare fuses (multiple amperage ratings)

Software

  1. Firmware Verification

  2. [ ] RoboRIO firmware matches current season

  3. [ ] Motor controller firmware (SPARK MAX, Talon, etc.)

  4. [ ] Radio programming matches current season

  5. [ ] Check all CAN IDs match code configuration

  6. [ ] Verify network settings match competition requirements

  7. Driver Station Setup

  8. [ ] Disable Windows updates

  9. [ ] Disable anti-virus software on the Driver Station laptop

  10. [ ] Disable sleep/hibernate modes

  11. [ ] Verify correct FRC Driver Station version

  12. [ ] Test all USB connections

  13. [ ] Configure and test all controller mappings

  14. [ ] Set team number correctly

  15. [ ] Test dashboard connectivity

  16. [ ] Backup Driver Station settings

  17. Code Management

  18. [ ] Test all autonomous routines on practice field

  19. [ ] Verify sensor calibrations

  20. [ ] Test fail-safe mechanisms

  21. [ ] Backup code to GitHub with tagged competition version

  22. [ ] USB drive with offline code backup

  23. [ ] Document any known issues or workarounds

  24. [ ] Print physical copy of robot code for reference (optional)

  25. [ ] Print a list of autonomous programs (sketches are even better!)

  26. Communication Setup

  27. [ ] Test radio connectivity at different distances

  28. [ ] Verify camera feeds (if used)

  29. [ ] Test emergency stop functionality

  30. [ ] Configure dashboard layouts for drivers/operators

  31. [ ] Test all feedback systems (LEDs, sensors)

  32. Documentation

  33. [ ] Print pit setup instructions

  34. [ ] Competition schedule and match strategy sheets

  35. [ ] Robot troubleshooting guide

  36. [ ] Wiring diagram

  37. [ ] Important contact numbers (mentors, technical support)

  38. [ ] List of known issues and solutions

  39. Practice Procedures

  40. [ ] Test complete robot startup sequence

  41. [ ] Practice quick battery swaps

  42. [ ] Test emergency procedures

  43. [ ] Practice field connection protocol

  44. [ ] Verify autonomous selection workflow

  45. [ ] Test communication between drive team members

  46. Safety Equipment

  47. [ ] Safety glasses for entire team

  48. [ ] Gloves for battery handling

  49. [ ] First aid kit

  50. [ ] Battery spill kit

  51. [ ] ESD protection for sensitive electronics

  52. Pre-Match Verification

  53. [ ] Create pre-match checklist

  54. [ ] Battery voltage threshold defined

  55. [ ] Mechanical systems check procedure

  56. [ ] Communication check procedure

  57. [ ] Autonomous mode selection verification

  58. [ ] Driver/operator position setup

Team History with Controls

2025 Season

Much of our hardware and software remains the same as 2024, we are just looking to level up this year!

  • Drivetrain: CTRE swerve + CTRE Kraken motors

  • Gyro: CTRE Pigeon2

  • Programming

  • Command Based Programming Java adapted from CTRE Generated Swerve drive

  • Improved use of CTRE control modes

  • Improved use of Path Planner

  • Improved use of Limelight

  • Improved use of LEDs for as feedback mechanism (CTRE CANdle controller)

  • Expanded use of Time of Flight (TOF) sensor "Playing with Fusion"

  • Restructuring code base to be more interchangeable from season to season, and robot to robot.

2024 Season

  • Drivetrain: MK4i swerve + CTRE Kraken motors

  • Gyro: CTRE Pigeon2

  • Programming

  • Command Based Programming Java adapted from CTRE Generated Swerve drive

  • Improved use of CTRE control modes such as MotionMagic

  • Improved use of Path Planner

  • Improved use of Limelight

  • Improved use of LEDs for as feedback mechanism (CTRE CANdle controller)

  • Implemented Time of Flight (TOF) sensor "Playing with Fusion"

2023 Season

  • Drivetrain: MK4i swerve + CTRE-Vex Falcon500 motors

  • Gyro: CTRE Pigeon

  • Programming:

  • Command based Java adapted from BearSwerve

  • Limited use of PathPlanner during autonomous

  • Limelight never made it to the competition bot

2022 Season

  • Drivetrain: MK3 swerve + CTRE-Vex Falcon500 motors

  • Programming:

  • Command based Java adapted from SDS

  • Limited use of Limelight

  • Basic path planning during autonomous

  • PhotonVision never made it out of beta

2019 and Prior

  • Drivetrain: Mecanum, tank drive, rhinotracks, or omni wheels combined with others depending on the game demands

  • Drive motors: CIM motors mostly, switched to Falcons in 2019?

  • Gyro: NavX

  • Programming: Iterative Java