updated pandoc templates
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
html:
|
||||
pandoc -s weather_station.md --toc --toc-depth=1 -c ./css/mvp.css \
|
||||
--template template.html -o weather_station.html
|
||||
--template ./template/template.html -o weather_station.html
|
||||
|
||||
pdf:
|
||||
pandoc weather_station.md --toc -o weather_station.pdf --pdf-engine=xelatex
|
||||
pandoc weather_station.md --toc -o weather_station.pdf --pdf-engine=xelatex -H ./template/custom_settings.tex
|
||||
|
||||
clean:
|
||||
rm -rvf build
|
||||
|
16
build-doc/template/custom_settings.tex
Normal file
16
build-doc/template/custom_settings.tex
Normal file
@@ -0,0 +1,16 @@
|
||||
% Override default figure placement To be within the flow of the text rather
|
||||
% than on it's own page.
|
||||
\usepackage{float}
|
||||
\usepackage{graphicx}
|
||||
\makeatletter
|
||||
\def\fps@figure{H}
|
||||
\makeatother
|
||||
|
||||
% Scale all large images to 50% of twext width
|
||||
\makeatletter
|
||||
\setkeys{Gin}{width=\ifdim\Gin@nat@width>\linewidth
|
||||
0.5\linewidth
|
||||
\else
|
||||
\Gin@nat@width
|
||||
\fi}
|
||||
\makeatother
|
@@ -49,14 +49,31 @@ $endfor$
|
||||
$if(title)$
|
||||
<header id="title-block-header">
|
||||
<nav id="$idprefix$TOC">
|
||||
<a href="https://www.meezenest.nl/mees/"><img alt="Logo" src="$logo$" height="70"></a>
|
||||
$if(toc)$
|
||||
<ul>
|
||||
<li><a href="#">Menu</a>
|
||||
$if(toc)$
|
||||
<li>
|
||||
<a href="#">Index</a>
|
||||
$table-of-contents$
|
||||
</li>
|
||||
$endif$
|
||||
$if(pdf_version)$
|
||||
<li>
|
||||
<a href="$pdf_version$">PDF version</a>
|
||||
</li>
|
||||
$endif$
|
||||
$if(git_repo)$
|
||||
<li>
|
||||
<a href="$git_repo$">Git repo</a>
|
||||
</li>
|
||||
$endif$
|
||||
$if(website)$
|
||||
<li>
|
||||
<a href="$website$">Back</a>
|
||||
</li>
|
||||
$endif$
|
||||
</ul>
|
||||
$endif$
|
||||
|
||||
<a href="https://www.meezenest.nl/mees/"><img alt="Logo" src="$logo$" height="70"></a>
|
||||
</nav>
|
||||
<h1 class="title">$title$</h1>
|
||||
$if(subtitle)$
|
||||
@@ -68,8 +85,8 @@ $endfor$
|
||||
$if(date)$
|
||||
<p class="date">$date$</p>
|
||||
$endif$
|
||||
$if(website)$
|
||||
<p><a href="$website$"><i>Back ↗</i></a></p>
|
||||
$if(pdf_version)$
|
||||
<p><a href="$pdf_version$"><i>PDF version</i></a></p>
|
||||
$endif$
|
||||
</header>
|
||||
$endif$
|
@@ -22,9 +22,9 @@
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<nav id="TOC">
|
||||
<a href="https://www.meezenest.nl/mees/"><img alt="Logo" src="./images/mees_logo.svg" height="70"></a>
|
||||
<ul>
|
||||
<li><a href="#">Menu</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">Index</a>
|
||||
<ul>
|
||||
<li><a href="#why-do-you-need-a-weather-station"
|
||||
id="toc-why-do-you-need-a-weather-station">Why do you need a
|
||||
@@ -55,13 +55,24 @@
|
||||
<li><a href="#license" id="toc-license">License</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<li>
|
||||
<a href="./weather_station.pdf">PDF version</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://git.meezenest.nl/">Git repo</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://meezenest.nl/mees/">Back</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a href="https://www.meezenest.nl/mees/"><img alt="Logo" src="./images/mees_logo.svg" height="70"></a>
|
||||
</nav>
|
||||
<h1 class="title">Weather station</h1>
|
||||
<p class="subtitle">with ModBus RTU interface</p>
|
||||
<p class="author">M.T. Konstapel</p>
|
||||
<p class="date">2024-01-15</p>
|
||||
<p><a href="https://meezenest.nl/mees/"><i>Back ↗</i></a></p>
|
||||
<p><a href="./weather_station.pdf"><i>PDF version</i></a></p>
|
||||
</header>
|
||||
<main>
|
||||
<article>
|
||||
@@ -579,7 +590,7 @@ import minimalmodbus
|
||||
# port name, slave address (in decimal)
|
||||
instrument = minimalmodbus.Instrument('/dev/ttyUSB1', 14)
|
||||
|
||||
# Register number, number of decimals, function code
|
||||
# register number, number of decimals, function code
|
||||
wind_direction = instrument.read_register(1, 0, 4)
|
||||
print(wind_direction)</code></pre>
|
||||
<h3 id="input-registers">Input registers</h3>
|
||||
@@ -669,10 +680,33 @@ APRS weather reports. But of course we use SI units.</p>
|
||||
<td>Temperature (two’s complement)</td>
|
||||
<td>degrees Celcius * 100</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>30014</td>
|
||||
<td>Status bits</td>
|
||||
<td>see table below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><sup>NOTE</sup> Register 30013 holds the backup temperature reading
|
||||
from the pressure sensor.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Status bits</th>
|
||||
<th>Description</th>
|
||||
<th>logic 0</th>
|
||||
<th>logic 1</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>0</td>
|
||||
<td>Heater status</td>
|
||||
<td>heater off</td>
|
||||
<td>heater on</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The ModBus registers are 16 bit wide. For better precision, some
|
||||
units are scaled by a factor of 10 or 100. This way, values with up to
|
||||
two decimal points can be stored as 16 bit integer values. Just divide
|
||||
|
@@ -5,7 +5,11 @@ author: M.T. Konstapel
|
||||
date: 2024-01-15
|
||||
website: https://meezenest.nl/mees/
|
||||
logo: ./images/mees_logo.svg
|
||||
pdf_version: ./weather_station.pdf
|
||||
git_repo: https://git.meezenest.nl/
|
||||
numbersections: true
|
||||
# Formatting:
|
||||
geometry: "a4paper, left=2.0cm, right=2.0cm, top=1.9cm, bottom=2.54cm"
|
||||
abstract: >
|
||||
A weather station build around a SparkFun Weather Meter Kit (SEN-15901). The temperature, humidity and pressure are measured with I2C sensors housed in an RS1 Passive Radiation Shield from Garni. The data can be read via an RS485 ModBus RTU interface. The main processor is an Arduino Pro Mini (ATmega328P 5V@16MHz)
|
||||
---
|
||||
@@ -286,9 +290,14 @@ The measurements and order of the measurements are the same as for APRS weather
|
||||
| 30011 | Snow fall | NOT IMPLEMENTED |
|
||||
| 30012 | Raw rain counter | NOT IMPLEMENTED |
|
||||
| 30013 | Temperature (two's complement) | degrees Celcius * 100 |
|
||||
| 30014 | Status bits | see table below |
|
||||
|
||||
^NOTE^ Register 30013 holds the backup temperature reading from the pressure sensor.
|
||||
|
||||
| Status bits | Description | logic 0 | logic 1 |
|
||||
|-------------|---------------|------------|-----------|
|
||||
| 0 | Heater status | heater off | heater on |
|
||||
|
||||
The ModBus registers are 16 bit wide. For better precision, some units are scaled by a factor of 10 or 100. This way, values with up to two decimal points can be stored as 16 bit integer values. Just divide by 10 or 100 to get the floating point values.
|
||||
|
||||
# Schematic
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user