|
Re: Help for a beginner
The biggest thing to realize is that programming for a robot has a different mindset most of the time than a desktop application.
Unlike a desktop application you are usually not doing one set of instructions in a set order then exiting the program. You usually have a "control loop". The code should maintain the state of the robot every so often, taking in inputs such as sensors, joysticks, etc, and send outputs such as giving motors power, activating pneumatics, etc.
I would definitely try to build a testing board to play with if you have the materials available to you.
There are a lot of templated things available for you in the WPILib (such as the SimpleRobot, IterativeRobot, and CommandBasedRobot templates). The FRC plugins also come packaged with a multitude of example projects that I suggest poking through and trying to understand.
|