Resources

FIRST Team Manual

Software

Table of Contents

  1. Introduction
  2. Code Resources
  3. Software
  4. Lynbrook Robotics Source Code

Introduction

cRIO
The FRC CompactRIO Controller

Since 2004, Robots in the FIRST Robotics Competitions have used the C programming language. C is well suited to access a microcontroller at the hardware level, allows powerful coding, and generates compact code.  Higher level languages, such as C++ or Java require more support code or lack the ability to program at the hardware level. Students who know C++ or Java should find the transition to C straightforward.  The greatest hurdle is creating a complex system to control motors and sensors in a short period of time. FIRST Robots use IFI Robotics' FRC Control system, that is composed of an operator interface for the joysticks and  the robot-side controller.  The two halves are linked by a two-way data radio modem. The robot-side controller contains two Microchip PIC18F8722 microcontrollers, in the roles of a Master and User controller.  From the programmer's viewpoint, only the User controller is visible and provides access to all of  the needed robot functions.  The IFI Robotics' FRC Robot Controller has 128 Kilobytes of program memory, >3KB of variable space, 1024 bytes of EEPROM, and operation speed of 10MIPs. The C compiler must be written specifically for the microcontroller used in the robot controller, which in this case, is the Microchip PIC18F8722.  Since the robot controller's instruction set differs from the instruction set of the CPU in a desktop computer, common C compilers such as MS Visual C cannot be used.  Our team uses Microchip's free MPLab IDE in combination with Microchip's commercial MPLab C18 compiler.  MPLab software operates on a M.S. Windows based computer, and the compiled code is then uploaded through a serial cable to the robot controller.

Code Resources

The primary code sources for FIRST Robot's are available through IFI Robotics' and Kevin Watson's (of NASA's Jet Propulsion Laboratory) websites. IFI Robotics provides default code for the current and prior years, while Kevin Watson's site contains the best collection of code for higher level control features, such as navigation, gyros, encoders, and camera's. Kevin Watson of NASA's Jet Propulsion Laboratory - Code for navigation, gyros, encoders, and camera's & links to Microchip documents. IFI Robotics - default code and code from prior years. Additionally, code from Lynbrook Robotics is available below.

Software

MPLab IDE - free download from Microchip.  Search for download in development tools area. The IDE (Integrated Development Environment) allows you to view and edit source code.  However, to compile the code, you need the add-in "MPLab C18" 'C' compiler. MPLab C18 Compiler - commercial product provided at no cost to the team.  Contact the team software group. IFI Loader - IFI Robotics; MS Windows based software used to upload the compiled code from the PC to the IFI FRC Robot Controller.  Dashboard - IFI Robotics; Optional MS Windows based utility software used to display data sent from the robot to the operator interface. A dashboard viewer may be found here.

Lynbrook Robotics Source Code

Zipped code archives – source code including MPLab project files. Download previous years' code.

FRC

2015 “Recycle Rush” - Lynbrook Robotics java code for the 2015 FRC season.

2014 “Aerial Assist” - Lynbrook Robotics C++ code for the 2014 FRC season.

2013 “Ultimate Ascent” - Lynbrook Robotics C++ code for the 2013 FRC season.

2012 “Rebound Rumble” - Lynbrook Robotics C++ code for the 2012 FRC season.

2011 “Logo Motion” - Lynbrook Robotics C++ code for the 2011 FRC season.

2010 “Breakaway” - Lynbrook Robotics C++ code for the 2010 San Diego Regional.  Includes code for updating the Jaguar speed controllers on the CAN bus asynchronously for faster communications.

2009 “Lunacy” - Lynbrook Robotics C++ code for the 2009 Atlanta Championships.

2008 “Overdrive" – Lynbrook Robotics C code for the 2008 Hawaii Regional - Winner of the Rockwell Automation Innovation in Control Award.

2007 “Rack ‘N’ Roll”– Lynbrook Robotics C code for the 2007 Lone Star Regional.

2006 “Aim High” – Lynbrook Robotics C code for the 2006 Silicon Valley Regional.

2005 “Triple Play” – Lynbrook Robotics C code for the 2005 FIRST Robotics Tetra Game (rev. w).

2004 “FIRST Frenzy: Raising the Bar” – Lynbrook Robotics C code for the 2004 FIRST Robotics Game.

FrcCode2005v2.4 – 2005 default code

EDU

WRRF EDU Code – Tutorial Code used at WRRF workshop (11/12/2005 Auth: D.Giandomenico)

VEX

VEX Programming Meetings - Lesson 01 — Starter code for the first VEX programming meeting

VexCode – default code for the VEX robots (NB: not factory code)