PreSeason Create Test Project: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
(Created page with "<div class="mw-parser-output"><span style="font-size: large;">'''Create a Test Project in FRC IDE'''</span><br/> <br/> 1. Start 'FRC VS Code 2019' (shortcut is on Desktop)<br/...")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="mw-parser-output"><span style="font-size: large;">'''Create a Test Project in FRC IDE'''</span><br/> <br/> 1. Start 'FRC VS Code 2019' (shortcut is on Desktop)<br/> 2. Open Command Pallete: either use Ctrl+Shift+P or select from 'View' menu<br/> 3. Select 'WPILib: Create a new project'<br/> 4. Click button 'Select a project type'<br/> 5. Select 'template'<br/> 6. For 'Select a language', select 'cpp'<br/> 7. For 'Select a project base', select 'Sample Robot'<br/> <br/> At this point under 'Welcome to WPILib New Project Creator' you will see:<br/> &nbsp;&nbsp; template cpp Sample Robot<br/> <br/> 8. Click 'Select a new project folder'<br/> 9. Navigate to Desktop (on left under 'Quick access')<br/> 10. Click 'New Folder' (on ribbon bar)<br/> 11. Enter 'preseason' for the folder's name<br/> 12. Click 'Select Folder'<br/> 13. For project name enter: test<br/> 14. For team number enter: 1511<br/> 15. Click 'Generate Project'<br/> 16. If prompted with 'Would you like to open the folder?', select 'Yes'<br/> 17. If prompted with 'Do you want to save your workspace...?', do the following:<br/> &nbsp;&nbsp;&nbsp; 17a. select 'Save'<br/> &nbsp;&nbsp;&nbsp; 17b. navigate to Destop<br/> &nbsp;&nbsp;&nbsp; 17c. for file name enter: preseason<br/> &nbsp;&nbsp;&nbsp; 17d. click Save<br/> &nbsp;&nbsp;&nbsp; 17e. for file name enter: preseason<br/> &nbsp;&nbsp;&nbsp; 17f. click Save<br/> <br/> At this point there will be a 'TEST' folder in the left pain, and in the TERMINAL window it will be doing an initial compile (let it finish). You will see:<br/> &nbsp;&nbsp; 'Starting a Gradel Daemon' and the percent going to 100%<br/> <br/> 18. Open Robot.cpp and Robot.h files:<br/> &nbsp;&nbsp;&nbsp; 18a. Expand 'test' (click on arrow next to it)<br/> &nbsp;&nbsp;&nbsp; 18b. Expand 'src'<br/> &nbsp;&nbsp;&nbsp; 18c. Expand 'main'<br/> &nbsp;&nbsp;&nbsp; 18d. Expand 'cpp'<br/> &nbsp;&nbsp;&nbsp; 18e. Expand 'include'<br/> &nbsp;&nbsp;&nbsp; 18f. Double-click 'Robot.cpp', under 'cpp' (to open it in the middle pane)<br/> &nbsp;&nbsp;&nbsp; 18g. Double-click 'Robot.h', under 'include' (to open it in the middle pane)<br/> <br/> 19. Replace the contents of Robot.cpp and Robot.h<br/> &nbsp;&nbsp;&nbsp; 19a. dowload the ZIP file:<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://penfieldrobotics.com/wiki/images/b/bc/Preseason_Initial.zip<br/> &nbsp;&nbsp;&nbsp; 19b. in FRC VS Code, in the opened Robot.cpp file, delete contents of Robot.cpp<br/> &nbsp;&nbsp;&nbsp; 19c. copy everything from ZIP's Robot.cpp into into FRC VS Code's Robot.cpp<br/> &nbsp;&nbsp;&nbsp; 19d. repeat previous 2 steps for Robot.h<br/> <br/> 20. Build the project following these steps: [[Preseason_Build_Project|Preseason Build Project]]</div>
# Start 'FRC VS Code' (shortcut is on Desktop)
# Open Command Palette: Ctrl+Shift+P, "W" menu in top-right corner, or select from 'View' menu
# Select 'WPILib: Create a new project' in the list
## Click button 'Select a project type'
## Select 'template'
## For 'Select a language', select 'cpp'
## For 'Select a project base', select 'Timed Skeleton (Advanced)'
# Now click 'Select a new project folder'
# Navigate to Desktop
# Click 'Select Folder' to choose the desktop as the project destination folder
# For "Project Name", enter ''preseason-yourname'' (replace ''yourname'' with your name)
# Make sure the "Create a new folder?" checkbox '''is checked'''
# For team number enter: 1511
# Make sure the "Enable Desktop Support" checkbox '''is NOT checked'''
# Click 'Generate Project'
# You will now be asked if you would like to open the folder - select 'Yes (Current Window)'
# At this point your project template should have been created and in the TERMINAL window it will be doing an initial compile (let it finish).
# Now you will add support for CAN bus based CTRE motor controllers to your project
## In the left side tree, right click on the file 'build.gradle'
## Choose '''Manage Vendor Libraries''' from the pop-up list
## At the top of the screen in the new menu that opens, choose "Install new libraries (offline)"
## Check the box next to '''CTRE-Phoenix''' then click OK
## You will be asked if you want to rebuild - you can choose yes
# Your pre-season project template is now ready to start one of the lessons.

Latest revision as of 20:39, 28 November 2021

  1. Start 'FRC VS Code' (shortcut is on Desktop)
  2. Open Command Palette: Ctrl+Shift+P, "W" menu in top-right corner, or select from 'View' menu
  3. Select 'WPILib: Create a new project' in the list
    1. Click button 'Select a project type'
    2. Select 'template'
    3. For 'Select a language', select 'cpp'
    4. For 'Select a project base', select 'Timed Skeleton (Advanced)'
  4. Now click 'Select a new project folder'
  5. Navigate to Desktop
  6. Click 'Select Folder' to choose the desktop as the project destination folder
  7. For "Project Name", enter preseason-yourname (replace yourname with your name)
  8. Make sure the "Create a new folder?" checkbox is checked
  9. For team number enter: 1511
  10. Make sure the "Enable Desktop Support" checkbox is NOT checked
  11. Click 'Generate Project'
  12. You will now be asked if you would like to open the folder - select 'Yes (Current Window)'
  13. At this point your project template should have been created and in the TERMINAL window it will be doing an initial compile (let it finish).
  14. Now you will add support for CAN bus based CTRE motor controllers to your project
    1. In the left side tree, right click on the file 'build.gradle'
    2. Choose Manage Vendor Libraries from the pop-up list
    3. At the top of the screen in the new menu that opens, choose "Install new libraries (offline)"
    4. Check the box next to CTRE-Phoenix then click OK
    5. You will be asked if you want to rebuild - you can choose yes
  15. Your pre-season project template is now ready to start one of the lessons.