diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..9d70075
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,23 @@
+name: Build LaTeX document
+on:
+ pull_request:
+ branches: [ "main" ]
+jobs:
+ build_latex:
+ permissions:
+ contents: write
+ pull-requests: write
+
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Git repository
+ uses: actions/checkout@v2
+ - name: Compile LaTeX document
+ uses: dante-ev/latex-action@latest
+ with:
+ entrypoint: ./build.sh
+ - name: Publish PDF
+ uses: actions/upload-artifact@v4
+ with:
+ name: worksheets
+ path: worksheets
diff --git a/.gitignore b/.gitignore
index 3a3b3b1..3ac55e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,10 @@ fp-info-cache
# Exported BOM files
*.xml
*.csv
+
+# Latex files
+*.aux
+*.fdb_latexmk
+*.fls
+*.log
+*.pdf
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..01d0405
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+mkdir worksheets
+
+cd macropad/worksheet/
+# This is a bit of a cheat, there's probably a better way of doing it.
+cp -r ../../worksheet-components/* ./
+make
+
+cd ../../worksheets
+cp ../macropad/worksheet/worksheet.pdf ./macropad.pdf
diff --git a/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.png b/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.png
new file mode 100644
index 0000000..716b8e3
Binary files /dev/null and b/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.png differ
diff --git a/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.svg b/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.svg
new file mode 100644
index 0000000..a8b8df6
--- /dev/null
+++ b/macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.svg
@@ -0,0 +1,3482 @@
+
+
diff --git a/macropad/worksheet/Makefile b/macropad/worksheet/Makefile
new file mode 100644
index 0000000..85cdf20
--- /dev/null
+++ b/macropad/worksheet/Makefile
@@ -0,0 +1,39 @@
+# You want latexmk to *always* run, because make does not have all the info.
+# Also, include non-file targets in .PHONY so they are run regardless of any
+# file of the given name existing.
+.PHONY: worksheet.pdf all clean
+
+# This should point at the relative path where the worsksheet components are
+export TEXINPUTS := .:../../worksheet-components/:
+
+# The first rule in a Makefile is the one executed by default ("make"). It
+# should always be the "all" rule, so that "make" and "make all" are identical.
+all: worksheet.pdf
+
+# CUSTOM BUILD RULES
+
+# In case you didn't know, '$@' is a variable holding the name of the target,
+# and '$<' is a variable holding the (first) dependency of a rule.
+# "raw2tex" and "dat2tex" are just placeholders for whatever custom steps
+# you might have.
+
+%.tex: %.raw
+ ./raw2tex $< > $@
+
+%.tex: %.dat
+ ./dat2tex $< > $@
+
+# MAIN LATEXMK RULE
+
+# -pdf tells latexmk to generate PDF directly (instead of DVI).
+# -pdflatex="" tells latexmk to call a specific backend with specific options.
+# -use-make tells latexmk to call make for generating missing files.
+
+# -interaction=nonstopmode keeps the pdflatex backend from stopping at a
+# missing file reference and interactively asking you for an alternative.
+
+worksheet.pdf: worksheet.tex
+ latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make worksheet.tex
+
+clean:
+ latexmk -CA
diff --git a/macropad/worksheet/img/component-layout.png b/macropad/worksheet/img/component-layout.png
new file mode 100644
index 0000000..873f3c2
Binary files /dev/null and b/macropad/worksheet/img/component-layout.png differ
diff --git a/macropad/worksheet/img/hole-colours.png b/macropad/worksheet/img/hole-colours.png
new file mode 100644
index 0000000..88b3cb3
Binary files /dev/null and b/macropad/worksheet/img/hole-colours.png differ
diff --git a/macropad/worksheet/img/hole-colours.svg b/macropad/worksheet/img/hole-colours.svg
new file mode 100644
index 0000000..777dfd7
--- /dev/null
+++ b/macropad/worksheet/img/hole-colours.svg
@@ -0,0 +1,2191 @@
+
+
diff --git a/macropad/worksheet/img/macropad-rev1-B_Cu_Oversized.png b/macropad/worksheet/img/macropad-rev1-B_Cu_Oversized.png
new file mode 100644
index 0000000..716b8e3
Binary files /dev/null and b/macropad/worksheet/img/macropad-rev1-B_Cu_Oversized.png differ
diff --git a/macropad/worksheet/img/macropad-rev1-schematic.png b/macropad/worksheet/img/macropad-rev1-schematic.png
new file mode 100644
index 0000000..cc7b471
Binary files /dev/null and b/macropad/worksheet/img/macropad-rev1-schematic.png differ
diff --git a/macropad/worksheet/img/macropad-rev1-schematic.ps b/macropad/worksheet/img/macropad-rev1-schematic.ps
new file mode 100644
index 0000000..0262b5a
Binary files /dev/null and b/macropad/worksheet/img/macropad-rev1-schematic.ps differ
diff --git a/macropad/worksheet/worksheet.tex b/macropad/worksheet/worksheet.tex
new file mode 100644
index 0000000..e182c9c
--- /dev/null
+++ b/macropad/worksheet/worksheet.tex
@@ -0,0 +1,187 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Stylish Title Page
+% LaTeX Template
+% Version 2.0 (22/7/17)
+%
+% This template was downloaded from:
+% http://www.LaTeXTemplates.com
+%
+% Original author:
+% Peter Wilson (herries.press@earthlink.net) with modifications by:
+% Vel (vel@latextemplates.com)
+%
+% License:
+% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
+%
+% This template can be used in one of two ways:
+%
+% 1) Content can be added at the end of this file just before the \end{document}
+% to use this title page as the starting point for your document.
+%
+% 2) Alternatively, if you already have a document which you wish to add this
+% title page to, copy everything between the \begin{document} and
+% \end{document} and paste it where you would like the title page in your
+% document. You will then need to insert the packages and document
+% configurations into your document carefully making sure you are not loading
+% the same package twice and that there are no clashes.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------------------------
+% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
+%----------------------------------------------------------------------------------------
+
+\documentclass[12pt]{article}
+\usepackage[UKenglish]{babel}
+\usepackage[margin=1in]{geometry}
+
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{import}
+\usepackage{lwworksheets}
+\usepackage{graphicx}
+
+
+\begin{document}
+
+\frontpage{USB Macro Keypad}
+
+%\import{../../worksheet-components}{title-page.tex}
+
+\section{Soldering}
+\label{sec:soldering}
+\begin{instructions}
+ \instruction{
+ Read through \textit{all} these instructions thoroughly.
+ }
+ \instruction{
+ Check and identify all components. Attach these with masking
+ tape to the sheet lablled "Parts List" (Section
+ \ref{sec:partslist}).
+ }
+ \instruction{
+ You are now going to solder the components to the board using
+ the instructions below. You will need to refer to Section
+ \ref{sec:placement} to see where each component should go.
+ }
+ \instruction{
+ Solder in the four \ohm{220} resistors, R1, R2, R3 and R4.
+ }
+ \instruction{
+ Solder in the four \ohm{10k} resistors, R5, R6, R7 and R8.
+ }
+ \instruction{
+ Solder in the two capacitors, C1 and C2, both 10nF.
+ }
+ \instruction{
+ Insert the 4 transistors, Q1-4. \textbf{Do NOT} solder them yet,
+ and be careful to insert them the right way round (see the
+ picture in Section \ref{sec:placement}).
+ }
+ \instruction{
+ Get a member of team to check the orientation of the
+ transistors, then solder them in place.
+ }
+ \instruction{
+ Insert the 4 LEDs, D1-4. \textbf{Do NOT} solder them yet, and be
+ careful to insert them the right way round (see the picture in
+ Section \ref{sec:placement}).
+ }
+ \instruction{
+ Get a member of team to check the orientation of the
+ LEDs, then solder them in place.
+ }
+ \instruction{
+ Solder the 4-pin header in the holes for U2. The pins are close
+ together, so be very careful not to bridge any pins when
+ soldering.
+ }
+ \instruction{
+ Ask a team member for the correct jig. Attach the two 20-pin
+ headers to the jig and insert the headers into the board, then
+ solder them in place. Again, be careful not to bridge any pins.
+ }
+ \instruction{
+ Solder the switches SW1-9.
+ }
+ \instruction{
+ Solder the rotary encoder SW10.
+ }
+ \instruction{
+ Ask a member of team to check your soldering.
+ }
+\end{instructions}
+
+\pagebreak
+\section{Assembly}
+\begin{instructions}
+ \instruction{
+ Fit four rubber feet to the four corners of the bottom of the
+ PCB, and a fifth rubber foot directly underneath the rotary
+ encoder.
+ }
+ \instruction{
+ Get a team member to check all your work.
+ }
+ \instruction{
+ With a team member, insert the screen and the Pi Pico and
+ connect it to a computer using a micro-USB cable.
+ Press each button to check that it's working as intended.
+ }
+ \instruction{
+ Once it all works (and not before!), fit the key caps to the
+ switches and the knob to the rotary encoder
+ }
+\end{instructions}
+
+\section{Component Info}
+
+\explainLed
+\explainMosfet
+
+\section{Schematic}
+\includegraphics[width=\textwidth]{img/macropad-rev1-schematic.png}
+
+%\section{Etch}
+%\label{sec:etch}
+%\includegraphics[width=\textwidth]{img/macropad-rev1-B_Cu_Oversized.png}
+
+\section{Placement}
+\label{sec:placement}
+\includegraphics[width=\textwidth]{img/component-layout.png}
+
+
+%\section{Drill Sizes}
+%\label{sec:drillsizes}
+%\includegraphics[width=\textheight,angle=90]{img/hole-colours.png}
+
+
+\section{Parts List}
+\label{sec:partslist}
+
+\def\arraystretch{2.5}
+\begin{tabular}{cccc}
+\hline
+\textbf{Reference} & \textbf{Value} & \textbf{Qty} & \textbf{Order Code} \\ \hline
+C1 - C2 & 10nF & 2 & \\ \hline
+D1 - D4 & LED & 4 & WP7113ID \\ \hline
+Q1 - Q4 & 2N7000 & 4 & 2N7000 \\ \hline
+R1 - R4 & \ohm{220} & 4 & \\ \hline
+R5 - R8 & \ohm{10k} & 4 & \\ \hline
+SW1 - SW9 & $\sim$ & 9 & Blue switch \\ \hline
+SW10 & RotaryEncoder\_Switch & 1 & PEC12R-4215F-S0024 \\ \hline
+U1 & Pico & 1 & Pi Pico \\ \hline
+U2 & MDOB128032GV-WI & 1 & MDOB128032GV-WI \\ \hline
+ & 4-pin socket & 1 & 61300411821 \\ \hline
+ & 20-pin header & 2 & PH1-20-UA \\ \hline
+ & Key cap & 9 & - \\ \hline
+ & Rotary knob & 1 & K70105 \\ \hline
+ & Rubber feet & 5 & SJ5382-TRANSP \\ \hline
+ & Circuit board & 1 & - \\ \hline
+\end{tabular}
+
+
+
+
+\end{document}
diff --git a/worksheet-components/img/2n7000-polarity.png b/worksheet-components/img/2n7000-polarity.png
new file mode 100644
index 0000000..4b9aea2
Binary files /dev/null and b/worksheet-components/img/2n7000-polarity.png differ
diff --git a/worksheet-components/img/led-polarity.png b/worksheet-components/img/led-polarity.png
new file mode 100644
index 0000000..4bd78d5
Binary files /dev/null and b/worksheet-components/img/led-polarity.png differ
diff --git a/worksheet-components/img/logo-dark-su.png b/worksheet-components/img/logo-dark-su.png
new file mode 100755
index 0000000..d66f66b
Binary files /dev/null and b/worksheet-components/img/logo-dark-su.png differ
diff --git a/worksheet-components/lwworksheets.sty b/worksheet-components/lwworksheets.sty
new file mode 100644
index 0000000..8b94326
--- /dev/null
+++ b/worksheet-components/lwworksheets.sty
@@ -0,0 +1,100 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{lwworksheets}[LiveWires electronics worksheets]
+
+\RequirePackage{graphicx}
+\RequirePackage{svg}
+\RequirePackage{longtable}
+\RequirePackage{textgreek}
+\RequirePackage{framed}
+
+\newcommand{\ohm}[1]{#1\textOmega}
+
+
+\newcounter{instructioncounter}
+
+\newcommand{\frontpage}[1]{
+
+ \begin{titlepage} % Suppresses headers and footers on the title page
+
+ \centering % Centre all text
+
+ %------------------------------------------------
+ % LW logo
+ %------------------------------------------------
+
+ \includegraphics[width=0.5\textwidth]{img/logo-dark-su.png}
+
+ \vspace{12em}
+
+ %------------------------------------------------
+ % Title and subtitle
+ %------------------------------------------------
+
+
+ \begin{minipage}{0.7\textwidth}
+ \centering
+
+ \noindent\rule[1em]{\textwidth}{2pt}\\
+
+ \vspace{1em}
+
+ \textsc{\bfseries \Huge #1}\\
+ \vspace{1em}
+ \Large Electronics Project\\
+
+ \vspace{1.2em}
+
+ \noindent\rule[1.2em]{\textwidth}{2pt}
+ \end{minipage}
+
+
+ \vfill
+
+ %------------------------------------------------
+ % Space for YP's name
+ %------------------------------------------------
+
+ \fbox{\begin{minipage}{\dimexpr\textwidth-2\fboxsep-2\fboxrule\relax}
+ {\Large\textbf{Name:}}\\ % Author name
+
+ \vspace{3em}
+ \end{minipage}}
+ \vspace{1em}
+
+ Worksheet published: \today
+
+ \end{titlepage}
+}
+
+
+\newcommand{\instruction}[1]{
+ \arabic{instructioncounter}.\stepcounter{instructioncounter} & #1 & \\ \hline
+}
+
+\newenvironment{instructions}{
+ \def\arraystretch{1.5}
+ \setcounter{instructioncounter}{1}
+ \begin{longtable}{| p{0.1\textwidth} | p{0.7\textwidth} | l |}
+ \hline
+ \textbf{No.} & \textbf{Instruction} & \textbf{Complete?} \\ \hline
+}{
+ \end{longtable}
+}
+
+\newcommand{\explainLed}{
+ \begin{minipage}[t]{0.4\textwidth}
+ \begin{framed}
+ \subsection*{LED}
+ \includegraphics[width=\textwidth]{img/led-polarity.png}
+ \end{framed}
+ \end{minipage}
+}
+
+\newcommand{\explainMosfet}{
+ \begin{minipage}[t]{0.4\textwidth}
+ \begin{framed}
+ \subsection*{2N7000}
+ \includegraphics[width=\textwidth]{img/2n7000-polarity.png}
+ \end{framed}
+ \end{minipage}
+}