2021:Programming: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
No edit summary
Line 10: Line 10:


== FIRST Programming Sofware (WPILib) ==
== FIRST Programming Sofware (WPILib) ==
* Follow the instructions on the official WPILib site: [https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html]
* Follow the instructions on the [https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html official WPILib site]
* You want to follow the instructions to install for C++ development
* You want to follow the instructions to install for C++ development
* This will install the 2021 version of VSCode and WPILib
* This will install the 2021 version of VSCode and WPILib
Line 19: Line 19:
# Install VSCode and WPILib first! See the previous section!
# Install VSCode and WPILib first! See the previous section!
# Install CTRE Phoenix - used for the Talon motor controllers
# Install CTRE Phoenix - used for the Talon motor controllers
## Download the tools from [https://github.com/CrossTheRoadElec/Phoenix-Releases/releases this page] -- 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)
## Download the tools from [https://github.com/CrossTheRoadElec/Phoenix-Releases/releases 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)
## 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.
## 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.
# Install SparkMAX software - used for the Spark MAX motor controllers
# Install SparkMAX software - used for the Spark MAX motor controllers
## Go to [https://docs.revrobotics.com/sparkmax/software-resources/spark-max-api-information#c-api]
## Go to https://docs.revrobotics.com/sparkmax/software-resources/spark-max-api-information#c-api
## Click on the "Download latest c++ API" button - this will be a .zip file
## Click on the "Download latest c++ API" button - this will be a .zip file
## Open Windows explorer and browse to C:\Users\Public\wpilib\2021
## Open Windows explorer and browse to C:\Users\Public\wpilib\2021
## Expand the .zip file you downloaded into this location
## Expand the .zip file you downloaded into this location
# Install the Rev Color Sensor libraries -- used for the color sensor
# Install the Rev Color Sensor libraries -- used for the color sensor
## Go to [https://www.revrobotics.com/rev-31-1557/]
## Go to https://www.revrobotics.com/rev-31-1557/
## Click on the "Java/C++ SDK Direct Download" link - this will download a .zip file
## Click on the "Java/C++ SDK Direct Download" link - this will download a .zip file
## Open Windows explorer and browse to C:\Users\Public\wpilib\2021
## Open Windows explorer and browse to C:\Users\Public\wpilib\2021
Line 35: Line 35:
SVN is our version control and source code system "in the cloud".  This has a [[SVN_Setup|dedicated setup and page]] that also includes info on using SVN.
SVN is our version control and source code system "in the cloud".  This has a [[SVN_Setup|dedicated setup and page]] that also includes info on using SVN.


Phoenix Libraries download:  https://www.ctr-electronics.com/control-system/hro.html#product_tabs_technical_resources
Rev Robotics SparkMAX download: https://www.revrobotics.com/sparkmax-software/
Color sensor download: https://www.revrobotics.com/rev-31-1557/ (edited)


= Helpful Links =
= Helpful Links =
* General WPILib docs: [https://docs.wpilib.org]
* General WPILib docs: https://docs.wpilib.org/
 
* Motor Controllers
 
** Rev Robotics Spark MAX
*** [https://www.revrobotics.com/sparkmax-software/ Software Resources], including detailed software documentation and setup tools
*** [https://www.revrobotics.com/content/sw/max/sw-docs/cpp/index.html Programming API Direct link]
** CTRE Talon-SRX Resources
*** [http://www.ctr-electronics.com/control-system/motor-control/talon-srx.html Cross the Road Electronics] - includes user's guide and software links
** [https://docs.ctre-phoenix.com Phoenix Software Documentation] - Programming API and setup tool documentation
** [https://www.ctr-electronics.com/downloads/api/cpp/html/index.html Programming API Direct link]
* [https://www.revrobotics.com/rev-31-1557/ Rev Robotics Color Sensor]


= Programming Archives =
= Programming Archives =

Revision as of 13:23, 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