Skip to content

Commit

Permalink
en: dialogues-with-computer: Fix some errors and typos
Browse files Browse the repository at this point in the history
* src/en/sections/dialogues-with-computer-algorithms.tex:,
src/en/sections/dialogues-with-computer-program-structure.tex: Fix errors and
typos found with the help of Edino Tavares Moniz.
  • Loading branch information
artyom-poptsov committed Feb 11, 2025
1 parent 0bf2969 commit 8193fca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/en/sections/dialogues-with-computer-algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ \section{Algorithms}
us around 16 millions operations per second.\footnote{In reality this value is
lesser than that indeed as different processor instructions take different
number of processor cycles.} Modern computers greatly surpass humans in the
speed of computation and the amounts of the stored information.
speed of computation and the amount of the stored information.
\item On the other hand, computers are mostly ``dumb'' -- in the sense that they
only do that was written in the instructions. Here we don't talk about more
only do what was written in the instructions. Here we don't talk about more
``intellectual'' systems, such as large language models or other systems with
complex behavior.
\end{enumerate}
Expand Down
22 changes: 11 additions & 11 deletions src/en/sections/dialogues-with-computer-program-structure.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ \section{The program structure for Arduino}
this book) and it has a bunch of interesting applications. One of such
applications is the micro-controller programming.

A programming language provides for a programmer the basis for expressing ides,
while allows us to implement missing parts, thus expanding its toolkit. In our
case the integrated development environment for developing programs for Arduino
(called Arduino IDE) includes the set of required libraries that makes it easier
to develop programs for the platform.
A programming language provides for a programmer the basis for expressing ideas,
while allowing us to implement missing parts, thus expanding its toolkit. In
our case the integrated development environment for developing programs for
Arduino (called Arduino IDE) includes the set of required libraries that makes
it easier to develop programs for the platform.

Aside from that, to make our job easier, Arduino IDE generates a stub for our
code when we are creating an empty project. An Arduino program usually consists
of two basic parts, that also called \emph{functions}: \texttt{setup} and
of two basic parts, that are also called \emph{functions}: \texttt{setup} and
\texttt{loop}. The stub looks like the following:

\begin{minted}{cpp}
Expand All @@ -31,16 +31,16 @@ \section{The program structure for Arduino}
}
\end{minted}

The lines starting with double slash (``//'') are considered by computer as
commentaries and ignored. Usually we can add or remove those lines without
The lines starting with double slash (``//'') are considered by the computer as
commentaries and are ignored. Usually we can add or remove those lines without
affecting the program logic, as the comments are for humans.

The \texttt{setup} procedure performs initialization of the micro-controller
when it starts. Here we should put all the commands that must be done once on
the system start.
when it starts. Here we should put all the commands that must be done once the
system starts.

The \texttt{loop} procedure executes after the finishing of \texttt{setup}
execution and automatically re-started by the system as soon as it finishes.
execution and is automatically re-started by the system as soon as it finishes.
Thus, \texttt{loop} is enclosed in some kind of internal loop as the function
title suggest -- until the micro-controller is powered off.

Expand Down

0 comments on commit 8193fca

Please sign in to comment.