Programming: Difference between revisions

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


<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
<div class="mw-parser-output">
<div class="mw-parser-output">
<div class="mw-parser-output">
<div class="mw-parser-output">
<div class="mw-parser-output">
Line 42: Line 43:
At this point there will be a 'TEST' folder in the left pain, and in the<br/> TERMINAL window it will be doing an initial compile. You will see:<br/> &nbsp;&nbsp; 'Starting a Gradel Daemon' and the percent going to 100%<br/> Let this finish.
At this point there will be a 'TEST' folder in the left pain, and in the<br/> TERMINAL window it will be doing an initial compile. You will see:<br/> &nbsp;&nbsp; 'Starting a Gradel Daemon' and the percent going to 100%<br/> Let this finish.


18. Replace the contents for the Robot.cpp and Robot.h files:<br/> &nbsp;&nbsp;&nbsp; 18a.&nbsp;download http://penfieldrobotics.com/wiki/images/a/a7/Preseason_Initial.zip <font color="#0066cc">Preseason_Initial.zip</font>] <br/> &nbsp;&nbsp;&nbsp; 18b.&nbsp;copy Robot.cpp to C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp<br/> &nbsp;&nbsp;&nbsp; 18c. copy Robot.h to C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h
18. Replace the contents for the Robot.cpp and Robot.h files:<br/> &nbsp;&nbsp;&nbsp; 18a.&nbsp;download [File:Preseason_Initial.zip]<br/> &nbsp;&nbsp;&nbsp; 18b.&nbsp;copy Robot.cpp to C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp<br/> &nbsp;&nbsp;&nbsp; 18c. copy Robot.h to C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h


&nbsp;
&nbsp;
</div> </div>
</div> </div></div>

Revision as of 10:38, 3 November 2019

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 [File: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