Programming: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
No edit summary
No edit summary
Line 32: Line 32:
<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">
=== Initial ===
=== Initial ===


Create a 'test' project as follows:
Create a 'test' project following these instructions: [http://penfieldrobotics.com/wiki/images/f/f4/Preseason_CreateProject.txt <font color="#0066cc">Create Test Project</font>]
 
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'
 
At this point under 'Welcome to WPILib New Project Creator' you will see:<br/> &nbsp;&nbsp; template cpp Sample Robot
 
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'
 
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 'Doyou want to save your workspace...?', then<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
 
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/b/bc/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 [http://penfieldrobotics.com/wiki/images/b/bc/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
[http://penfieldrobotics.com/wiki/images/f/f4/Preseason_CreateProject.txt <font color="#0066cc">Create Test Project</font>]
[[File:Preseason CreateProject.txt|RTENOTITLE]]


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

Revision as of 10:25, 17 November 2019

FRC and WPILib References

Quite Useful Things to Remember

Camera Server Port is 1181

Programming Preseason

Files

Initial

Create a 'test' project following these instructions: Create Test Project

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