<commit_before>\documentclass[12pt,titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{graphicx}
\usepackage[british]{babel}
\usepackage{multicol}
\usepackage{hyperref}
\title{Study text}
\author{<NAME>}

\usepackage{minted}
\definecolor{bg}{rgb}{0.95,0.95,0.95}
\newminted{cpp}{linenos=true,  bgcolor=bg, xleftmargin=2em, fontsize=\footnotesize}
\newcommand{\codetitle}[1]{\bigskip \noindent {\scriptsize #1}\hrule}


\begin{document}
\begin{titlepage}
\begin{center}
\textsc{\LARGE Study text}\\[1cm]
\textsc{\Large Arduino WSN}\\[0.6cm]


\Large{<NAME>}\\[1cm]

\bigskip
\bigskip

\end{center}
\end{titlepage}



\tableofcontents
\newpage
\section{Introduction}

Purpose of this text is to provide general introduction to Arduino and aplications which can be made using Arduino platform. Focus of second and third part will be at wireless communication and makind wireless sensor networks with Arduino based nodes. All used source codes can be found at Edu-Hoc project home, \url{https://github.com/crocs-muni/Edu-hoc}; at official Arduino website, \url{www.arduino.cc}; or at JeeLib library website, \url{http://jeelabs.net/projects/jeelib/wiki}.

\section{Arduino - general view}
Arduino is an open-source platform and also phenomenon of last few years. It offers hardware itself and also software for programming ATMega micro controllers. Thre are not only official Arduino boards, but also large number of clones. These are motivated either by cheaper price or by added functionality compared to offcial ones. First category  typically includes Chinesse clones like Funduino or others, while second category consists usually of specialized boards like JeeLink and JeeNode USB, which we are going to use.

From all containing Arduino platform we will use only developement enviroment, because our focus will be on ad-hoc networks, we will use specialized boards with build-in radio module, as was mentioned earlier in the text. Nevertheless we will start with absolute basics of working with Arduino.

	\subsection{Arduino IDE}
	Arduino IDE is very simple enviroment for developement programs, from practical point of view, it is just a litle bit tweaked text editor with added support for Arduino.
	It supports all major OS, so you can run it on linux, windows or OS X. It can run without installation, but this option does not support commmunication with boards over serial port. So this option is usefull for programing, but if you want to sent program to board itself or communicate with it, then it is highly recomended to install Arduino IDE on your computer.

	You can benefit from this enviroment also if you decide to use your favourite text editor for actual coding, then Arduino IDE could be used just for compiling the code or because of other tools it offers. 
		\paragraph{Installation}
		\paragraph{Introduction to tools}
		\paragraph{Compilation \& upload}
		\paragraph{Serial monitor}

	\subsection{Arduino Code basics}
		\paragraph{Setup}
		\paragraph{Loop}
		\paragraph{Serial}
			\subparagraph{Print}
			\subparagraph{Read}

\section{WSN node, JeeLib basics}
<commit_msg>english scenario<commit_after>\documentclass[12pt,titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{graphicx}
\usepackage[british]{babel}
\usepackage{multicol}
\usepackage{hyperref}
\title{Study text}
\author{<NAME>}

\usepackage{minted}
\definecolor{bg}{rgb}{0.95,0.95,0.95}
\newminted{cpp}{linenos=true,  bgcolor=bg, xleftmargin=2em, fontsize=\footnotesize}
\newcommand{\codetitle}[1]{\bigskip \noindent {\scriptsize #1}\hrule}


\begin{document}
\begin{titlepage}
\begin{center}
\textsc{\LARGE Study text}\\[1cm]
\textsc{\Large Arduino WSN}\\[0.6cm]


\Large{<NAME>}\\[1cm]

\bigskip
\bigskip

\end{center}
\end{titlepage}



\tableofcontents
\newpage
\section{Introduction}

Purpose of this text is to provide general introduction to Arduino and applications which can be made using Arduino platform. Focus of second and third part will be at wireless communication and making wireless sensor networks with Arduino based nodes. All used source codes can be found at Edu-Hoc project home, \url{https://github.com/crocs-muni/Edu-hoc}; at official Arduino website, \url{www.arduino.cc}; or at JeeLib library website, \url{http://jeelabs.net/projects/jeelib/wiki}.

\section{Arduino - general view}
Arduino is an open-source platform and also phenomenon of last few years. It offers hardware itself and also software for programming ATMega micro controllers. Thre are not only official Arduino boards, but also large number of clones and derivatives. These are motivated either by cheaper price or by added functionality compared to official ones. First category  typically includes Chinese clones like Funduino or others, while second category consists usually of specialized boards like JeeLink and JeeNode USB, which we are going to use.

From all containing Arduino platform we will use only development environment, because our focus will be on ad-hoc networks, we will use specialized boards with build-in radio module, as was mentioned earlier in the text. Nevertheless we will start with absolute basics of working with Arduino.

	\subsection{Arduino IDE}
	Arduino IDE is very simple environment for development programs, from practical point of view, it is just a little bit tweaked text editor with added support for Arduino.
	It supports all major OS, so you can run it on Linux, Windows or OS X. It can run without installation, but this option does not support communication with boards over serial port. So this option is useful for programing, but if you want to sent program to board itself or communicate with it, then it is highly recommended to install Arduino IDE on your computer.

	You can benefit from this environment also if you decide to use your favorite text editor for actual coding, then Arduino IDE could be used just for compiling the code or because of other tools it offers.
		\paragraph{Installation}
		Installation is not difficult at all. Many Linux distributions will ease the process, because Arduino IDE package is usually present in the system repositories. Only thing you should care about is the version of such package, ideally it should be 1.5 or higher.

		In case of Windows OS, recommended approach is to download installation files directly from official webpage \url{http://arduino.cc/en/Main/Software} where you will find executable files, which will either install Arduino IDE on your machine, or just run Arduino IDE itself (in case you do not have access to administrator account on machine you are working).

		If for whatever reason you need to install Arduino IDE some other way (e.g. directly from source code), then all the information you should need is again accessible on official webpage \url{http://arduino.cc/en/Main/Software}.
		\paragraph{Tools}
		\subparagraph{Verification}
		One of the most important tool which environment offers is verifier which sole purpose is to  check for syntax errors of your code. This option is unfortunately not real time, so it is more than recommended to check your syntax once a while.
		\subparagraph{Compilation}
		Second tool is compiler, which also takes care of upload to the board. Fist you are required to select your version of Arduino board, in some cases board which is the most similar to one you have (especially important if you have clones or various derivates). Next you should check port setting and set the port which is the board connected to. In case of only one board connected, IDE usually selects the right port autonomously, but it is recommended to check it. It is also possible to connect multiple board at once and then you need to select the right one.

		In case of issues with detection of board it is recommended to restart whole IDE and try again. Also it is good practice to connect the board before you start the IDE.

		\subparagraph{Serial monitor}
		Serial monitor is last of the important tools which are useful to know. Although its functionality can be substituted bu any program, which allows communication over serial port (e.g. PySerial), on the other hand Serial Monitor is the most accessible tool you have.

		After start you are required to set up communication frequency (same value as in source code) and then you can read information send from the board or send instructions to the board.

		If you can see characters, which make no sense, it is more than likely, that it is an issue with different setup of frequency on board and Serial Monitor. 

	\subsection{Arduino Code basics}
		\paragraph{Setup}
		\paragraph{Loop}
		\paragraph{Serial}
			\subparagraph{Print}
			\subparagraph{Read}

\section{WSN node, JeeLib basics}

{'fraction_non_alphanumeric': 0.06231386025200458, 'fraction_numerical': 0.004810996563573883, 'mean_word_length': 4.721494102228047, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1437727', 'n_tokens_mistral': 2384, 'n_tokens_neox': 2217, 'n_words': 1176}