Skip to content

Commit

Permalink
feat: rpi hat board
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfischer committed Feb 25, 2024
1 parent 702374d commit 99a506e
Show file tree
Hide file tree
Showing 11 changed files with 874 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-pcb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: build-pcb

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry --version
- name: Install dependencies
run: poetry install --no-interaction

- name: Create mechanical files
run: poetry run make pcb-mech

- name: Build PCBs
uses: docker://ghcr.io/atopile/atopile-kicad
with:
context: pcb

- name: Upload PCB artifacts
uses: actions/upload-artifact@v3
with:
name: pcb-build
path: pcb/build/
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.mypy_cache
.pytest_cache
.venv
.vscode/
/_build
/dist
/docs/_build
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ lint-python lint-shell:
test:
pytest

.PHONY: pcb-mech
pcb-mech:
console pcb-outline --board="rpi_hat" > pcb/mech/rpi_hat.dxf


.PHONY: _build/open-graph-card/final-assembly.png
_build/open-graph-card/final-assembly.png:
Expand Down
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sethfischer/rover
=================

|build-status| |lint-status| |test-status| |docs-status| |linkcheck-status|
|build-status| |lint-status| |test-status| |docs-status| |linkcheck-status| |build-pcb-status|


Quarter-scale Mars rover based on the NASA Mars 2020 Mission Perseverance Rover.
Expand Down Expand Up @@ -47,3 +47,6 @@ License
.. |linkcheck-status| image:: https://github.com/sethfischer/rover/actions/workflows/linkcheck.yml/badge.svg
:target: https://github.com/sethfischer/rover/actions/workflows/linkcheck.yml
:alt: Link Check Status
.. |build-pcb-status| image:: https://github.com/sethfischer/rover/actions/workflows/build-pcb.yml/badge.svg
:target: https://github.com/sethfischer/rover/actions/workflows/build-pcb.yml
:alt: PCB build status
39 changes: 39 additions & 0 deletions pcb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# For PCBs designed using KiCad: https://www.kicad.org/
# Format documentation: https://kicad.org/help/file-formats/

# Temporary files
*.000
*.bak
*.bck
*.kicad_pcb-bak
*.kicad_sch-bak
*-backups
*.kicad_prl
*.sch-bak
*~
_autosave-*
*.tmp
*-save.pro
*-save.kicad_pcb
*.kicad_pcb.lck
fp-info-cache

# Netlist files (exported from Eeschema)
*.net

# Autorouter files (exported from Pcbnew)
*.dsn
*.ses

# Exported BOM files
*.xml
*.csv

build/

# .ato directory
.ato/

# Mechanical files built from source
mech/**
!mech/README.rst
6 changes: 6 additions & 0 deletions pcb/ato.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ato-version: ^0.2.0
builds:
default:
entry: elec/src/rpi_hat.ato:RpiHat
dependencies:
- generics
7 changes: 7 additions & 0 deletions pcb/elec/src/rpi_hat.ato
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module RpiHat:
"""
Raspberry Pi HAT

Conforming with the HAT+ specification dated 2023-12-20.
"""
signal gnd
9 changes: 9 additions & 0 deletions pcb/mech/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
============================
Atopile mechanical directory
============================

Files for this directory can be generated with:

```
make pcb-mech
```
1 change: 1 addition & 0 deletions pcb/metadata/pos-header
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Designator,Value,Package,Mid X,Mid Y,Rotation,Layer
Loading

0 comments on commit 99a506e

Please sign in to comment.