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">
= Programming Preseason =
= Programming Preseason =


*[http://penfieldrobotics.com/wiki/images/a/a7/Programming.pdf <font color="#0066cc">C++ Overview Slides</font>]<br/> &nbsp;
*[http://penfieldrobotics.com/wiki/images/a/a7/Programming.pdf <font color="#0066cc">C++ Overview Slides</font>]  
</div> </div>
 
== Files ==
== Files ==


=== Initial ===
=== Initial ===


Robot.cpp (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp)
Create a 'test' project as follows:
 
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.
 
Download this zip and replace the files in your project:


Robot.h (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h)
*Robot.cpp (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp)
</div> </div>
*Robot.h (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h) </div> </div>
</div>

Revision as of 11:22, 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.

Download this zip and replace the files in your project:

  • Robot.cpp (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\cpp\Robot.cpp)
  • Robot.h (replaces: C:\Users\Robotics\Desktop\preseason\test\src\main\include\Robot.h)