Skip to content

Commit

Permalink
feat: rpi hat pcb
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfischer committed Apr 6, 2024
1 parent 4250a75 commit 94e0e32
Show file tree
Hide file tree
Showing 40 changed files with 27,833 additions and 4 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-pcb:
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@v5
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: sethfischer/atopile-action@main
with:
path: "pcb/"

- name: Upload PCB artifacts
uses: actions/upload-artifact@v4
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
5 changes: 4 additions & 1 deletion docs/build-release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Prerequisites
* `Python`_ >=3.11, and python-venv.
* `Poetry`_ for Python dependency management.
* `Mayo 3D CAD viewer and converter`_ for exporting PNG images.
* `KiCad EDA`_ v8 (a dependency of `atopile`_) for building PCB manufacturing files.
* Optional:
- `ImageMagick`_ for manipulating images.
- `exiftool`_ for manipulating EXIF headers.
Expand All @@ -54,7 +55,7 @@ Install prerequisites
sudo apt-get install git python3.11 python3.11-venv imagemagick optipng exiftool
Poetry, Mayo, and git-lfs should be installed according to their respective documentation,
Poetry, Mayo, git-lfs, and KiCad should be installed according to their respective documentation,
and be available in your path.


Expand Down Expand Up @@ -114,6 +115,8 @@ Run linters and tests:
.. _`Git`: https://git-scm.com/
.. _`Poetry`: https://python-poetry.org/
.. _`Mayo 3D CAD viewer and converter`: https://github.com/fougue/mayo
.. _`KiCad EDA`: https://www.kicad.org/
.. _`atopile`: https://atopile.io/
.. _`ImageMagick`: https://imagemagick.org/
.. _`exiftool`: https://exiftool.org/
.. _`git-lfs`: https://git-lfs.com/
Expand Down
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

# atopile
.ato/
build/
elec/footprints/footprints.kicad_sym

# Mechanical files built from source
mech/**
!mech/README.rst
7 changes: 7 additions & 0 deletions pcb/ato.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ato-version: ^0.2.35
builds:
rpi-hat:
entry: elec/src/rpi-hat.ato:RpiHat
dependencies:
- generics
- rpi-header

Large diffs are not rendered by default.

Loading

0 comments on commit 94e0e32

Please sign in to comment.