Team 1114 Example C++ Code

(Reposted here from the FIRST Forums for better reliability and visibility)

Over the course of the beta test, Team 1114 has been retrofitting the 2007 robot, Simbot Prime, with the new control system. Here is the C++ code we’ve developed for teleoperated control of the robot. It includes examples of an IterativeRobot with one-joystick drive and simple arm control, as well as some convenience classes we wrote for double solenoids and the Logitech Dual Action Gamepad (unfortunately, we can’t distribute the source of the WPILib library we’re building against due to the terms of the NDA).

We’re currently working on programming an autonomous mode which can score a tube on the rack guided by the green light; the code’ll be released in a week or two when we’re done. (4.4 KB) (4.4 KB)

It’s good to see the C++ published beta tester code samples catching up with the LabVIEW - looking forward to the autonomous code sample!

Keep 'em coming, folks. :slight_smile:

Here’s the final version of the code, which has an autonomous mode that tracks the green light and scores a tube on a spider leg. Also included is a class we wrote for doing PID calculations 1114-style. Comments and questions are welcome. (8.73 KB) (8.73 KB)