Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,43 @@ prev: ../stage-overview
next: false
---

import { FileTree } from '@astrojs/starlight/components';
import YouTube from '../../../../../components/YouTube.astro';

Welcome to Stage 1A!
Before we can start programming, we have to fork and clone the relevant repository:

- If your team primarily uses REV electronics (such as Spark MAX motor controllers), clone [the REV template](https://github.com/frcsoftware/Stage1-Template-REV).
- If your team primarily uses CTRE electronics (such as Kraken motors), clone [the CTRE template](https://github.com/frcsoftware/Stage1-Template-CTRE).

<Aside type="tip">
If you forgot how to fork and clone a repository, read over [the Forking and
Cloning guide](/learning-course/getting-started/forking-and-cloning/).
</Aside>

Now, before we get into the depths of the robot code, it's useful to look at a high-level overview of the contents of a
typical WPILib project.
As your code gets more advanced, you'll see more folders and files appear, but they're all controlled
by the same basic components.
Below, you can see the sample file structure you'll be starting off with as a template for Stage 1A.
If your robot has REV electronics, then the template folder's name will be `rev/` instead of `ctre/`

### Stage 1A Template Structure

{/* rli:ignore */}

```text
ctre/
├── src/main/
| ├── java/first/
| | ├── robot/
| | | ├── opmode/
| | | | ├── MyAuto.java
| | | | ├── MyTeleop.Java
| | | ├── simulation/
| | | | ├── DrivetrainSim.Java
| | | | ├── SingleFlywheelSim.java
| | | ├── Robot.java
| | ├── Main.java
```
{/* prettier-ignore */}
<FileTree>
- src
- main
- java
- first
- robot
- opmode
- MyAuto.java
- MyTeleop.java
- simulation
- DrivetrainSim.java
- SingleFlywheelSim.java
- Robot.java
- Main.java
</FileTree>

You'll notice that we're skipping a lot of files here, because you don't have to edit those.
What's great about using a framework like WPILib is that it automatically generates these files when you create a new project, so you can get started coding quicker.
Expand Down