summaryrefslogtreecommitdiff
path: root/suppl/intro.tex
blob: e7eb4eaddd9b315f1b0402476c4ef95e4eb81f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
\chapter{Introduction}
\thispagestyle{empty}
\label{sec:intro}
Microcontrollers are the foundation for a modern, manufacturing-based
economy. One cannot fulfill the dreams of one's citizens without a
thriving manufacturing sector. As it is open source, \arduino\ is of
particular interest to hobbyists, students, small and medium scale
manufacturers, and people from developing countries, in particular.

Scilab is a state-of-the-art computing software. It is also open source. As a result, this is also extremely useful to the groups
mentioned above. If the French National Space Agency CNES can
extensively use Scilab \cite{CNES-Scilab}, why can't others rely on
it? If many of India's satellites can be placed in their precise
orbits by the Ariane rockets launched by CNES through Scilab
calculations, why can't others use Scilab?

The above argument can be extended to other open source software
systems Python, Julia, and OpenModelica. Python is a versatile
programming language with a high degree of expressiveness, which
allows code written in it to be small. Python is also the preferred
language in emerging areas, such as machine learning. Julia is also
highly expressive, just as Scilab and Python. The only difference is
that Julia is generally faster to execute, compared to Scilab and
Python.

OpenModelica implements the Modelica language. It is especially
created for modeling. It is an object-oriented programming language,
especially when it comes to modeling. It has a GUI that lends itself
to connecting different building blocks to create models. Models in
OpenModelica are solved by collecting equations from different
building blocks and solving them simultaneously.

Xcos is a GUI based system building tool for Scilab, somewhat similar
to
Simulink$^{\text{\textregistered}}$\footnote{Simulink$^{\text{\textregistered}}$
  is a registered trademark of MathWorks, Inc.}. Through Xcos, it is
possible to build interconnected systems graphically. Xcos also is an
open source software tool.

Although Scilab, Xcos, Python, Julia, and OpenModelica are powerful and
free, there has not been much literature that teaches how to use them
to program the versatile \arduino. To address this gap, we have
written this series of books. We have provided code written in all of
these open source software. The reader is recommended to go through
the book that covers a particular software.

The only way we can become versatile in hardware is through hands-on
training. To this end, we make use of the easily available low-cost
\arduino\ board to introduce the reader to computer interfacing. We
also make available the details of a Shield that makes the
\arduino\ use extremely easy and intuitive. We tell the user how to
install the firmware to make the \arduino\ board communicate with the
computer. We explain how to control the peripherals on the
\arduino\ board with user-developed software.

The Scilab-Arduino toolbox is already available for Windows
\cite{scilab-arduino}. We have suitably modified it so that it works
on Linux also. We give the required programs to experiment with the
sensors and actuators that come with the Shield, a DC motor, and a
servomotor. These programs are available for all of the following
environments: Arduino IDE, Scilab, Xcos, Python, Julia, and
OpenModelica. In addition to these toolboxes, we provide the firmware
for each software and a program to check its working.

This book teaches how to access the following sensors and actuators:
LED, pushbutton, LDR, Potentiometer, Thermistor, Servo motor, and DC motor. A set of two to five programs are given for each. These are given for all the
software mentioned above. The reader has to see the book devoted to
the appropriate software. We also explain where to find these
programs and how to execute them for each experiment.

This book is written for self-learners and hobbyists. It has been
field-tested by 250 people who attended a hands-on workshop conducted
at IIT Bombay in July 2015. It has also been field-tested by 25
people who participated in a TEQIP course held in Amravati in November
2015.

All the code described in this book is available at
\url{https://floss-arduino.fossee.in/downloads}.  On
downloading and unzipping it, it will open a folder {\tt Origin} in
the current directory.  All the files mentioned in this book are
with reference to this folder\footnote{\label{fn:file-loc}This naming
  convention will be used throughout this book.  Users are expected to
  download this file and use it while reading this book.}.