2021:Programming: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
Line 39: Line 39:
* WPILib
* WPILib
** General docs, including tools use, software links, and installation info: https://docs.wpilib.org/
** General docs, including tools use, software links, and installation info: https://docs.wpilib.org/
** C++ API for all WPILib classes https://first.wpi.edu/wpilib/allwpilib/docs/release/cpp/index.html
** [https://first.wpi.edu/wpilib/allwpilib/docs/release/cpp/index.html C++ API Direct link] for all WPILib classes
* Motor Controllers
* Motor Controllers
** Rev Robotics Spark MAX
** Rev Robotics Spark MAX

Revision as of 13:25, 30 January 2021

General programming stuff relevant to all subsystems should be documented here.

SVN Info

Source code for 2021 is in SVN at https://svn.penfieldrobotics.com/FRC2020/trunk/thunderbot2020/ (yes, 2020 this isn't a typo!)

For information on setting up your computer to use SVN, go to our SVN page


Set up your computer for 2021 Development

FIRST Programming Sofware (WPILib)

  • Follow the instructions on the official WPILib site
  • You want to follow the instructions to install for C++ development
  • This will install the 2021 version of VSCode and WPILib
  • You do not need to install NI FRC Game Tools for home programming - that installation is only needed to get the Driver Station software.

Thirdparty Vendor Libraries

We need "vendor libraries" installed to be able to write software using the motor controllers and some sensors on the robot. These do not get included with base WPILib - they are separate downloads from the manufacturer of the motor controllers/sensors.

  1. Install VSCode and WPILib first! See the previous section!
  2. Install CTRE Phoenix - used for the Talon motor controllers
    1. Download the tools from the CTRE Github site -- look at the most recent post there for "CTRE Phoenix Framework Installer" - click on the download link at the bottom of the most recent post for the Windows installer (.exe)
    2. Run the installer for it. This will install the software libraries and some tools (Phoenix Lifeboat and others starting with "Phoenix"). You do not need the tools, so those shortcuts can be deleted if you wish.
  3. Install SparkMAX software - used for the Spark MAX motor controllers
    1. Go to https://docs.revrobotics.com/sparkmax/software-resources/spark-max-api-information#c-api
    2. Click on the "Download latest c++ API" button - this will be a .zip file
    3. Open Windows explorer and browse to C:\Users\Public\wpilib\2021
    4. Expand the .zip file you downloaded into this location
  4. Install the Rev Color Sensor libraries -- used for the color sensor
    1. Go to https://www.revrobotics.com/rev-31-1557/
    2. Click on the "Java/C++ SDK Direct Download" link - this will download a .zip file
    3. Open Windows explorer and browse to C:\Users\Public\wpilib\2021
    4. Expand the .zip file you downloaded into this location

SVN Setup

SVN is our version control and source code system "in the cloud". This has a dedicated setup and page that also includes info on using SVN.


Helpful Links

Programming Archives