Skip to main content

Methods

In this module, we will cover the concept of methods in programming and how to implement them in the context of FRC robot development. Methods are reusable blocks of code that perform specific tasks, allowing for modular and organized programming.


Presentation


Exercises

Methods

  • Write methods to convert the encoder inputs usable outputs
    • translation position in m
    • translation speed in m/s
    • rotation position in radians
    • rotation speed in rads/s
  • Write methods to set the speed drive motors
    • setting the left motor only
    • setting the right motor only
    • method that performs the math of arcade drive and sets the motors (using above methods)
  • Write methods to update the inputs and outputs following the IO model

Software

  • Methods: A detailed explanation of methods in programming, including how to create and use them effectively.

Hardware

  • IMU: Guide on using Inertial Measurement Units (IMUs) for robot orientation and movement tracking.

Software Tools

  • VSCode: Our primary Integrated Development Environment (IDE) for programming.
  • Driver Station: Software used to control and monitor the robot during competitions.
  • Elastic: Tool for logging and visualizing robot data.