Implement and document Arduino software

This commit is contained in:
Philipp Matthias Schaefer 2020-12-11 14:18:46 +01:00
parent 28de70e732
commit 001c7cd568
17 changed files with 648 additions and 70 deletions

33
documentation/Makefile Normal file
View file

@ -0,0 +1,33 @@
# Copyright (c):
#
# Philipp Matthias Schäfer (philipp.matthias.schaefer@posteo.de), 2020
#
# This file is part of the KrautStatus' Arduino code.
#
# The Clean CommonMark library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The Clean CommonMark library is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License along
# with the Clean CommonMark library. If not, see
# <https://www.gnu.org/licenses/>.
.PHONY: all clean
all: arduino.png
clean:
rm --recursive build
arduino.png: arduino.tex build
pdflatex -output-directory build arduino
convert -density 300 build/arduino.pdf -trim -colorspace RGB arduino.png
build:
mkdir --parents build

BIN
documentation/arduino.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

55
documentation/arduino.tex Normal file
View file

@ -0,0 +1,55 @@
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[
chip/.style = {
dipchip,
hide numbers,
no topmark,
external pins width=0,
num pins=14,
}]
\ctikzset{multipoles/dipchip/width=1.6}
% Arduino MKR1000
\node [chip] (MKR1000) {};
% align=center enables line breaks in node text
\node [align=center, rotate=90] at (MKR1000.center){Arduino\\MKR1000};
\draw (MKR1000.n) -- ++(0,1) node[vcc]{};
\draw (MKR1000.s) -- ++(0,-1) node[ground] {};
\node [right, font=\tiny] at (MKR1000.bpin 4) {0};
\node [left, font=\tiny] at (MKR1000.bpin 12) {VIN};
\node [left, font=\tiny] at (MKR1000.bpin 11) {A3};
\node [left, font=\tiny] at (MKR1000.bpin 10) {A4};
% Arduino MKR RGB Shield
\node[chip, right=of MKR1000] (RGB) {};
% align=center enables line breaks in node text
\node [align=center, rotate=90] at (RGB.center){Arduino\\MKR RGB Shield};
\draw (RGB.s) -- ++(0, -1) node[ground]{};
\node [right, font=\tiny] at (RGB.bpin 3) {VIN};
\node [right, font=\tiny] at (RGB.bpin 4) {A3};
\node [right, font=\tiny] at (RGB.bpin 5) {A4};
\draw (MKR1000.bpin 12) -- (RGB.bpin 3);
\draw (MKR1000.bpin 11) -- (RGB.bpin 4);
\draw (MKR1000.bpin 10) -- (RGB.bpin 5);
% Reed switch
\draw (MKR1000.bpin 4) -- ++(-1, 0) to [normal open switch, name=R] ++(0, -2.96) node[ground]{};
\node [rotate=90, above] at (R) {Reed Switch};
\end{circuitikz}
\end{document}