X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=top%2F4iot.tex;fp=top%2F4iot.tex;h=378497a91af348316150b0d5797b0836f5d574ff;hb=37e6240fbe3b2d1d8e6babdcc8c48b1b78f31999;hp=25e04ad730f11f092a7155b6b1d68f6625684ece;hpb=cdb3ae89b207b609a67f3436d02b7eed6aa4a3ce;p=phd-thesis.git diff --git a/top/4iot.tex b/top/4iot.tex index 25e04ad..378497a 100644 --- a/top/4iot.tex +++ b/top/4iot.tex @@ -30,9 +30,9 @@ The software is usually a cyclic executive instead of tasks that run in an \gls{ Hence, all tasks must be manually combined into a single program. \begin{table} + \centering \caption{Hardware characteristics of a laptop and two typical microcontrollers.}% \label{tbl:mcu_laptop} - \centering \begin{tabular}{llll} \toprule & Laptop & Atmega328P & ESP8266\\ @@ -104,7 +104,7 @@ To simulate a loop, the \cleaninline{rpeat} task combinator is used as this task The body of the \cleaninline{rpeat} task contanis a task that writes to the pins and waits in between. The tasks are connected using the sequential \cleaninline{>>|.} combinator that for all current intents and purposes executes the tasks after each other. -\begin{lstClean}[float=ht,caption={Blinking the \gls{LED} using the \cleaninline{rpeat} combinator.},label={lst:blinkImp}] +\begin{lstClean}[caption={Blinking the \gls{LED} using the \cleaninline{rpeat} combinator.},label={lst:blinkImp}] blinkTask :: Main (MTask v ()) | mtask v blinkTask = declarePin D2 PMOutput \ledPin-> {main = rpeat ( @@ -137,7 +137,7 @@ Now say that we want to blink multiple blinking patterns on different \glspl{LED For example, blink three \glspl{LED} connected to \gls{GPIO} pins $1,2$ and $3$ at intervals of \qtylist{500;300;800}{\ms}. Intuitively you would want to lift the blinking behaviour to a function in order to minimise duplicate code and increase modularity and call this function three times with different parameters as shown in \cref{lst:blinkthreadno}. -\begin{lstArduino}[float=ht,caption={Naive approach to multiple blinking patterns.},label={lst:blinkthreadno}] +\begin{lstArduino}[caption={Naive approach to multiple blinking patterns.},label={lst:blinkthreadno}] void setup () { ... } void blink(int pin, int wait) { digitalWrite(pin, HIGH);