Coding the Romi- Basic Movement
Challenge: Code the Romi
Now, you've just learned all the tools you'll use to code the Romi. This might be a difficult task, but splitting it up into smaller chunks will make it significantly easier to deal with.
Generally, your code should:
Come up with a thorough plan before you code, with backup plans. It will save you the hassle of rewriting everything mid-code. Also, bounce ideas off other programmers, and make sure to work with them. It's a good skill to work with others in a FIRST Robotics team, anyway.
RomiDrivetrain (Subsystem)
Write a GetInstance() Method
Your code should:
Write a moveRobot() Method
moveRobot() MethodNow that you learned about how to set motors, at the bottom of the RomiDrivetrain class, make a helper method called moveRobot().
Conditions:
Once you have what you believe to be your answer, compare your code with the answer code below.
Answer Breakdown
Command
Create a MoveRobot() command
All you'll need to do is make a class that:
Answer Breakdown
RobotContainer
Bind MoveRobot() Command to Trigger
This is the final step before you can move the robot! All you'll need to do is:
Last updated