Programming

From 1511Wookiee
Revision as of 10:50, 3 November 2019 by Programming (talk | contribs)
Jump to navigationJump to search

FRC and WPILib References

Quite Useful Things to Remember

Camera Server Port is 1181

Programming Preseason

Files

Initial

Create a 'test' project as follows:

1. Start 'FRC Vs Code 2019' (shortcut is on Desktop)
2. open Command Pallete: either use Ctrl+Shift+P or select from 'View' menu
3. select 'WPILib: Create a new project'
4. click button 'Select a project type'
5. select 'template'
6. for 'Select a language', select 'cpp'
7. for 'Select a project base', select 'Sample Robot'

At this point under 'Welcome to WPILib New Project Creator' you will see:
   template cpp Sample Robot

8. click 'Select a new project folder'
9. navigate to Desktop (on left under 'Quick access')
10. click 'New Folder' (on ribbon bar)
11. enter 'preseason' for the folder's name
12. click 'Select Folder'

13. for project name enter: test
14. for team number enter: 1511
15. click 'Generate Project'
16. If prompted with 'Would you like to open the folder?', select 'Yes'
17. If prompted with 'Doyou want to save your workspace...?', then
    17a. select 'Save'
    17b. navigate to Destop
    17c. for file name enter: preseason
    17d. click Save
    17e. for file name enter: preseason
    17f. click Save

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. You will see:
   'Starting a Gradel Daemon' and the percent going to 100%
Let this finish.

18. Replace the contents for the Robot.cpp and Robot.h files:
    18a. download Preseason_Initial.zip
    18b. copy Robot.cpp to C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp
    18c. copy Robot.h to C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h