View Single Post
  #2   Spotlight this post!  
Unread 11-01-2013, 19:34
Michael_Lee Michael_Lee is offline
Registered User
FRC #2976
 
Join Date: Jan 2012
Location: Issaquah, WA
Posts: 21
Michael_Lee is an unknown quantity at this point
Re: New to Windriver/C++

I'd recommend you first read through this website:

http://wpilib.screenstepslive.com/s/3120

It's a comprehensive tutorial that covers most of the details on how to deploy code to the robot, set up your development environment, and some details on how the WPILib library works. It actually combines several documents that used to be in separate pdfs last year.

However, it doesn't give you the actual API, which is a tad bit inconvenient. You can find that on your computer by going to:

Code:
C:\WindRiver\docs\extensions\FRC
...and looking through the files there. You probably want to look at the "GettingStartedWithC.pdf" and "WPI Robotics Library User's Guide" (although some of the information may be repeats of what you read in the website linked above).

The actual API can be found in the "WPILib C++ Reference.chm" file. There's a chance it might not display anything correctly if you open it. If so, right-click, hit properties, and look around a bit until you see something like "unblock". You can ignore a lot of the classes you see there for now. Initially, you probably want to look at the 'RobotDrive' class to actually drive the robot, the 'Joystick' class for input, and the 'Jaguar/Victor/Talon/SpeedController' classes to control various motors.

I'd also recommend you study up on object-oriented programming a bit. While you can use WPILib in a procedural manner, it's really meant to be an OOP library. Since you came from C, you might find that a bit foreign at first, but the examples FIRST provides makes it fairly easy to learn as you go.

I'd also recommend you study up a little on electronics. I guess it's not strictly needed to program the robot, but I personally found it really useful since it let me know what was actually going on with my code (plus, a lot of the mistakes I first made when I first joined FRC were a combination of programming and wiring errors, so knowing some electronics makes debugging a less frustrating experience).

The kit of parts section of usfirst.org is really useful.

http://www.usfirst.org/roboticsprogr...c-kit-of-parts

It has links to a whole bunch of resources (not necessarily programming-related).

Finally, you could try looking through this website. Nearly all the FRC-related software lives there, so you might be able to find some documentation there.
http://firstforge.wpi.edu/sf/sfmain/do/listProjects
Reply With Quote