-
Notifications
You must be signed in to change notification settings - Fork 22
Add hardware intro and resources overview pages #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
reniejoshi
wants to merge
41
commits into
frcsoftware:main
Choose a base branch
from
reniejoshi:hardware-intro
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
dad88dc
Add hardware intro page
reniejoshi 0c10d17
Add other resources to home cards grid
reniejoshi a5c6c30
Add resources overview page based on FRCDesign.org
reniejoshi f2a14c1
Update HardwareIntro to commands v3
reniejoshi f02d1c5
Merge branch 'main' into hardware-intro
reniejoshi e94bbed
Implement requested changes
reniejoshi 115aec7
Create robot project for resources
reniejoshi ea5a27d
Fix code region path
reniejoshi 79ce476
Add beam brake and limit switch sections
reniejoshi 7b4164f
Add heading and odometry to glossary
reniejoshi 7c7a884
Generate glossary
reniejoshi c8f99c7
Merge branch 'main' into hardware-intro
reniejoshi 87d50d1
Merge branch 'main' into hardware-intro
reniejoshi 78beced
update codeowners (#110)
samfreund 3f24c00
Merge branch 'main' into hardware-intro
reniejoshi 86a2955
Merge branch 'main' of https://github.com/frcsoftware/frcsoftware.org…
reniejoshi 9e17ebe
Merge branch 'main' into hardware-intro
reniejoshi aac3b25
Merge branch 'main' of https://github.com/frcsoftware/frcsoftware.org…
reniejoshi bf4e018
Merge branch 'main' into hardware-intro
reniejoshi 0e6a8b0
Merge branch 'main' of https://github.com/frcsoftware/frcsoftware.org…
reniejoshi 5cea06d
Merge branch 'main' into hardware-intro
reniejoshi 7fd3775
Merge branch 'main' into hardware-intro
reniejoshi 895b754
Merge branch 'main' into hardware-intro
reniejoshi 3f3c681
Merge branch 'main' into hardware-intro
reniejoshi 1a1fee8
Merge branch 'main' into hardware-intro
reniejoshi 0221064
Merge branch 'main' into hardware-intro
reniejoshi ed5ad25
Merge branch 'main' into hardware-intro
reniejoshi 7b86967
Merge branch 'main' into hardware-intro
reniejoshi 8619398
Merge branch 'main' into hardware-intro
reniejoshi 0d96cb6
Merge branch 'main' into hardware-intro
reniejoshi fce3173
Merge branch 'main' into hardware-intro
zachwaffle4 bebafe8
Merge branch 'main' into hardware-intro
reniejoshi 320d5c7
Merge branch 'main' into hardware-intro
Adrianamm 452ef88
Merge branch 'main' of https://github.com/frcsoftware/frcsoftware.org…
reniejoshi 8e6eedc
Fix hardware intro definitions and descriptions
reniejoshi eea2af9
Fix indentation errors in HardwareIntro.java and regenerate glossary
reniejoshi 938f0b4
Improve beam break and limit switch comparison
reniejoshi 1c4d5a6
Implement requested changes in hardware intro
reniejoshi eb04c9f
Merge branch 'hardware-intro' of https://github.com/reniejoshi/frcsof…
reniejoshi b37e443
Merge branch 'main' of https://github.com/frcsoftware/frcsoftware.org…
reniejoshi 1f20899
Remove unused climber source code region
reniejoshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| import type { HTMLAttributes } from 'astro/types'; | ||
|
|
||
| interface Props extends Omit<HTMLAttributes<'a'>, 'title'> { | ||
| title: string; | ||
| description?: string; | ||
| eyebrow?: string; | ||
| href: string; | ||
| } | ||
|
|
||
| const { title, description, eyebrow, href, ...attributes } = Astro.props; | ||
| --- | ||
|
|
||
| <a class="content-card" href={href} {...attributes}> | ||
| {eyebrow && <p class="content-card-eyebrow">{eyebrow}</p>} | ||
| <h3>{title}</h3> | ||
| {description && <p class="content-card-description">{description}</p>} | ||
| <slot /> | ||
| <span class="content-card-arrow" aria-hidden="true">→</span> | ||
| </a> | ||
|
|
||
| <style> | ||
| .content-card { | ||
| position: relative; | ||
| display: flex; | ||
| min-height: 11.5rem; | ||
| flex-direction: column; | ||
| padding: 1.2rem; | ||
| border: 1px solid var(--sl-color-gray-5); | ||
| border-radius: 0.5rem; | ||
| color: inherit; | ||
| text-decoration: none; | ||
| background: var(--sl-color-black); | ||
| transition: | ||
| border-color 160ms ease, | ||
| background-color 160ms ease; | ||
| } | ||
|
|
||
| .content-card:hover { | ||
| border-color: var(--accent-color); | ||
| background: color-mix( | ||
| in srgb, | ||
| var(--sl-color-black) 92%, | ||
| var(--accent-color) | ||
| ); | ||
| } | ||
|
|
||
| .content-card-eyebrow { | ||
| margin: 0 2.25rem 0.7rem 0; | ||
| color: var(--sl-color-text-accent); | ||
| font-size: 0.76rem; | ||
| font-weight: 800; | ||
| letter-spacing: 0; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .content-card h3 { | ||
| margin: 0 2.25rem 0.55rem 0; | ||
| color: var(--sl-color-white); | ||
| font-size: 1.35rem; | ||
| line-height: 1.2; | ||
| } | ||
|
|
||
| .content-card-description { | ||
| margin: 0; | ||
| color: var(--sl-color-gray-2); | ||
| line-height: 1.55; | ||
| } | ||
|
|
||
| .content-card-arrow { | ||
| position: absolute; | ||
| top: 1rem; | ||
| right: 1.15rem; | ||
| color: var(--sl-color-gray-3); | ||
| font-size: 1.35rem; | ||
| line-height: 1; | ||
| transition: color 160ms ease; | ||
| } | ||
|
|
||
| .content-card:hover .content-card-arrow { | ||
| color: var(--accent-color-hover); | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| interface Props { | ||
| label?: string; | ||
| title: string; | ||
| description?: string; | ||
| } | ||
|
|
||
| const { label, title, description } = Astro.props; | ||
| --- | ||
|
|
||
| <section class="content-titlebar"> | ||
| {label && <p class="content-titlebar-label">{label}</p>} | ||
| <h2>{title}</h2> | ||
| {description && <p class="content-titlebar-description">{description}</p>} | ||
| </section> | ||
|
|
||
| <style> | ||
| .content-titlebar { | ||
| padding: 1.25rem 0 1.75rem; | ||
| margin-bottom: 1.5rem; | ||
| border-bottom: 1px solid var(--sl-color-gray-5); | ||
| } | ||
|
|
||
| .content-titlebar-label { | ||
| margin: 0 0 0.35rem; | ||
| color: var(--sl-color-text-accent); | ||
| font-size: 0.78rem; | ||
| font-weight: 800; | ||
| letter-spacing: 0; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .content-titlebar h2 { | ||
| max-width: 18ch; | ||
| margin: 0; | ||
| color: var(--sl-color-white); | ||
| font-size: clamp(2.2rem, 4.8vw, 3.6rem); | ||
| line-height: 1; | ||
| } | ||
|
|
||
| .content-titlebar-description { | ||
| max-width: 46rem; | ||
| margin: 1rem 0 0; | ||
| color: var(--sl-color-gray-2); | ||
| font-size: 1.05rem; | ||
| line-height: 1.65; | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: Hardware Intro | ||
| description: An introduction to hardware components for programmers | ||
| --- | ||
|
|
||
| ## Motors | ||
|
|
||
| The difference between motors and motor controllers is motors are the physical actuators that spin a robot's mechanisms while motor controllers are the electronic interfaces that control the speed and direction of the motor. | ||
| Most motor controllers also offer smart abilities like onboard PID controllers and integrated encoders. | ||
|
|
||
| Motor controllers are used throughout the robot in many mechanisms: | ||
|
|
||
| - Intakes: Spin wheels to collect game pieces | ||
| - Shooters: Spin flywheels to launch game pieces | ||
| - Indexers: Move game pieces through the robot | ||
| - Arms/Elevators: Raise and lower mechanisms (often with position control) | ||
| - Climbers: Extend or retract climbing mechanisms | ||
|
|
||
| CAN motor controllers are available through vendors such as CTR Electronics (Talon FX) and REV Robotics (SPARK MAX). | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ## Encoders | ||
|
|
||
| Encoders are a sensor for measuring rotational motion. | ||
| They are reliable and less-prone to noise and interference than analog devices (such as potentiometers) because they produce digital signals. | ||
| They can return the position and velocity of a mechanism. | ||
| Encoders come in a variety of form factors, and may be mounted at the end of a shaft or have a shaft run through them. | ||
| Many motor controllers also have integrated encoders. | ||
| Relative encoders track changes in position and reset to zero when the robot is turned off, while absolute encoders track exact, unique positions across a full rotation and retain this data even when powered off. | ||
|
|
||
| ## Beam Break | ||
|
|
||
| A beam break detects if anything is between two points and returns a binary value. | ||
| Beam breaks are typically [`DigitalInput`](https://github.wpilib.org/allwpilib/docs/2027/java/org/wpilib/hardware/discrete/DigitalInput.html)s and will return a `boolean`. | ||
| Beam breaks can be used to detect when game pieces pass a specific point on a robot. | ||
|
|
||
| ## Limit Switch | ||
|
|
||
| A limit switch detects if something is at a certain position or distance and returns a binary value. | ||
| Limit switches are often used to restrict the range of motion of a joint or detect the presence of game pieces. | ||
| While beam breaks and limit switches both detect the presence of an object, they differ in how they do this. | ||
| Beam breaks detect whether a beam of light is being blocked by an object, while limit switches require physical contact with an object to detect it. | ||
|
|
||
| ## Inertial Measurement Units (IMUs) | ||
|
|
||
| An IMU is a sensor that combines an accelerometer and a gyroscope. | ||
| IMUs are used to measure a robot's orientation, rates of rotation, and acceleration and return these signals as a [`Rotation2d`](https://github.wpilib.org/allwpilib/docs/2027/java/org/wpilib/math/geometry/Rotation2d.html). | ||
| They typically use degrees or radians for angular position (yaw/heading, pitch, and roll) and degrees per second or radians per second for angular velocity. | ||
| They can be used for robot heading readings and odometry calculations. | ||
| The most popular IMUs in FRC are navX2, Pigeon 2.0, and the onboard SystemCore IMU. | ||
|
reniejoshi marked this conversation as resolved.
|
||
| Note that the onboard SystemCore IMU is new for 2027 and has not undergone significant successful testing. | ||
|
|
||
| One important thing to note is that gyros measure rate rather than position. | ||
| Position is inferred by repeatedly measuring the angular velocity and multiplying those values by the delta time between readings. | ||
| Gyro angle measurements are always relative to some arbitrary zero angle determined by the angle of the gyro either when the robot was turned on or a zeroing method was called. | ||
| They can have accumulated errors (called “drift”) that increase in magnitude the longer the gyro is used. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| title: Overview | ||
| description: An overview of additional programming resources | ||
| --- | ||
|
|
||
| import { CardGrid } from '@astrojs/starlight/components'; | ||
| import ContentCard from '../../../components/ContentCard.astro'; | ||
| import ContentTitleBar from '../../../components/ContentTitleBar.astro'; | ||
|
|
||
| <ContentTitleBar | ||
| label="Resources" | ||
| title="Enhance your programming workflow." | ||
| description="Resources to help improve your knowledge of terms and support your programming workflow." | ||
| /> | ||
|
|
||
| <CardGrid> | ||
|
|
||
| <ContentCard | ||
| href="/resources/glossary/" | ||
| eyebrow="Reference" | ||
| title="Glossary" | ||
| description="A compiled list of acronyms, abbreviations, and definitions to help explain the language used across the site and community." | ||
| /> | ||
|
|
||
| <ContentCard | ||
| href="/resources/hardware-intro/" | ||
| eyebrow="Overview" | ||
| title="Hardware Intro" | ||
| description="An overview of common FRC hardware components for programmers." | ||
| /> | ||
|
|
||
| </CardGrid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.