diff options
author | SudhakarKuma | 2021-05-03 06:49:18 +0530 |
---|---|---|
committer | SudhakarKuma | 2021-05-03 06:49:18 +0530 |
commit | e794d9c61ad1820f2174987fe578b4963fa149c0 (patch) | |
tree | 45255c58c320a275843d49cc5a0990ff533af44a | |
parent | cb278a52f64e83a0fd5873bbda457e7141ef0c41 (diff) | |
download | FLOSS-Arduino-Book-e794d9c61ad1820f2174987fe578b4963fa149c0.tar.gz FLOSS-Arduino-Book-e794d9c61ad1820f2174987fe578b4963fa149c0.tar.bz2 FLOSS-Arduino-Book-e794d9c61ad1820f2174987fe578b4963fa149c0.zip |
Add thermistor update
34 files changed, 2233 insertions, 1905 deletions
diff --git a/bibliography.bib b/bibliography.bib index 7e9da42..2a801be 100644 --- a/bibliography.bib +++ b/bibliography.bib @@ -207,3 +207,14 @@ note = {Seen on 21 April 2021}, OPTannote = {} } +@Misc{therm-wiki, +OPTkey = {}, +author = {}, +title = {Thermistor - Wikipedia}, +howpublished = {https://en.wikipedia.org/wiki/Thermistor}, +OPTmonth = {}, +year = {}, +note = {Seen on 2 May 2021}, +OPTannote = {} +} + diff --git a/floss-arduino.OpenModelicad b/floss-arduino.OpenModelicad index 59ac918..73e7c1d 100644 --- a/floss-arduino.OpenModelicad +++ b/floss-arduino.OpenModelicad @@ -13,18 +13,18 @@ \addvspace {10pt} \contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{147}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{165}% -\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{166}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{169}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{170}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{186}% -\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{186}% -\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{187}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{192}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{192}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{193}% \addvspace {10pt} -\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{208}% -\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{209}% -\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{210}% -\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{210}% +\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{214}% +\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{215}% +\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{216}% +\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{216}% \addvspace {10pt} -\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{230}% -\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{230}% -\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{231}% +\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{236}% +\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{236}% +\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{237}% diff --git a/floss-arduino.ard b/floss-arduino.ard index 8ad7f35..855de95 100644 --- a/floss-arduino.ard +++ b/floss-arduino.ard @@ -13,16 +13,16 @@ \addvspace {10pt} \contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{138}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{153}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{154}% \contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{154}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{171}% -\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{171}% -\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{171}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{177}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{177}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{177}% \addvspace {10pt} -\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{191}% -\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{192}% -\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in increments}{192}% -\contentsline {section}{\numberline {10.{4}}Rotating the servomotor through the potentiometer}{193}% +\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{197}% +\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{198}% +\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in increments}{198}% +\contentsline {section}{\numberline {10.{4}}Rotating the servomotor through the potentiometer}{199}% \addvspace {10pt} -\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{225}% +\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{231}% diff --git a/floss-arduino.aux b/floss-arduino.aux index 2ee99e5..3ce535e 100644 --- a/floss-arduino.aux +++ b/floss-arduino.aux @@ -920,640 +920,656 @@ \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{152}\protected@file@percent } \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{152}\protected@file@percent } \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{152}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{1}}{}}{153}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{153}\protected@file@percent } -\newlabel{sec:therm-arduino-code}{{8.3.2}{153}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash buzzer/therm\textendash buzzer.ino}{153}\protected@file@percent } +\@writefile{toc}{\contentsline {paragraph}{Note:}{154}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{1}}{}}{154}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{154}\protected@file@percent } +\newlabel{sec:therm-arduino-code}{{8.3.2}{154}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{153}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{153}\protected@file@percent } -\newlabel{84@xvr}{{}{153}} -\newlabel{84@vr}{{}{153}} -\newlabel{ard:therm-read}{{8.{1}}{153}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{153}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{154}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{154}\protected@file@percent } +\newlabel{84@xvr}{{}{154}} +\newlabel{84@vr}{{}{154}} +\newlabel{ard:therm-read}{{8.{1}}{154}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{154}\protected@file@percent } \@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{2}}{}}{154}\protected@file@percent } \@writefile{ard}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{154}\protected@file@percent } \newlabel{85@xvr}{{}{154}} \newlabel{85@vr}{{}{154}} \newlabel{ard:therm-buzzer}{{8.{2}}{154}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash buzzer/therm\textendash buzzer.ino}{154}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{154}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{154}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{2}}{}}{155}\protected@file@percent } -\newlabel{therm-abc}{{8.1}{155}} -\newlabel{therm-beta}{{8.2}{156}} -\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{156}\protected@file@percent } -\newlabel{sec:therm-scilab-code}{{8.4.2}{156}} -\@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{156}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{156}\protected@file@percent } -\newlabel{86@xvr}{{}{156}} -\newlabel{86@vr}{{}{156}} -\newlabel{sci:therm-read}{{8.{1}}{156}} +\@writefile{toc}{\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{155}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{155}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash read.sce}{155}\protected@file@percent } \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash read.sce}{156}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{156}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{156}\protected@file@percent } -\newlabel{87@xvr}{{}{156}} -\newlabel{87@vr}{{}{156}} -\newlabel{sci:therm-buzzer}{{8.{2}}{156}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash buzzer.sce}{156}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{157}\protected@file@percent } -\newlabel{89@xvr}{{}{157}} -\newlabel{89@vr}{{}{157}} -\newlabel{fig:therm-read}{{8.5}{157}} -\@writefile{toc}{\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{157}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{158}\protected@file@percent } -\newlabel{tab:therm-read}{{8.1}{158}} -\newlabel{90@xvr}{{}{158}} -\newlabel{90@vr}{{}{158}} -\@writefile{lof}{\contentsline {figure}{\numberline {8.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{158}\protected@file@percent } -\newlabel{92@xvr}{{}{158}} -\newlabel{92@vr}{{}{158}} -\newlabel{fig:therm-read-output}{{8.6}{158}} -\@writefile{lof}{\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{159}\protected@file@percent } -\newlabel{94@xvr}{{}{159}} -\newlabel{94@vr}{{}{159}} -\newlabel{fig:therm-buzzer}{{8.7}{159}} -\@writefile{lof}{\contentsline {figure}{\numberline {8.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{159}\protected@file@percent } -\newlabel{97@xvr}{{}{159}} -\newlabel{97@vr}{{}{159}} -\newlabel{fig:therm-buzzer-output}{{8.8}{159}} -\@writefile{lot}{\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{160}\protected@file@percent } -\newlabel{tab:therm-buzzer}{{8.2}{160}} -\newlabel{95@xvr}{{}{160}} -\newlabel{95@vr}{{}{160}} -\@writefile{toc}{\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{160}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{160}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.2}Python Code}{161}\protected@file@percent } -\newlabel{sec:therm-pyhton-code}{{8.6.2}{161}} +\@writefile{toc}{\contentsline {paragraph}{Note:}{156}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{2}}{}}{157}\protected@file@percent } +\newlabel{therm-abc}{{8.1}{157}} +\newlabel{therm-beta}{{8.2}{157}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{157}\protected@file@percent } +\newlabel{sec:therm-scilab-code}{{8.4.2}{157}} +\@writefile{cod}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{157}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{157}\protected@file@percent } +\newlabel{86@xvr}{{}{157}} +\newlabel{86@vr}{{}{157}} +\newlabel{sci:therm-read}{{8.{1}}{157}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash read.sce}{158}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{158}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{158}\protected@file@percent } +\newlabel{87@xvr}{{}{158}} +\newlabel{87@vr}{{}{158}} +\newlabel{sci:therm-buzzer}{{8.{2}}{158}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash buzzer.sce}{158}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{158}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{159}\protected@file@percent } +\newlabel{89@xvr}{{}{159}} +\newlabel{89@vr}{{}{159}} +\newlabel{fig:therm-read}{{8.5}{159}} +\@writefile{lot}{\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{159}\protected@file@percent } +\newlabel{tab:therm-read}{{8.1}{159}} +\newlabel{90@xvr}{{}{159}} +\newlabel{90@vr}{{}{159}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.6}{\ignorespaces Plot window in Xcos to read thermistor values\relax }}{160}\protected@file@percent } +\newlabel{fig:therm-read-output}{{8.6}{160}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{160}\protected@file@percent } +\newlabel{92@xvr}{{}{160}} +\newlabel{92@vr}{{}{160}} +\newlabel{fig:therm-buzzer}{{8.7}{160}} +\@writefile{lot}{\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{161}\protected@file@percent } +\newlabel{tab:therm-buzzer}{{8.2}{161}} +\newlabel{93@xvr}{{}{161}} +\newlabel{93@vr}{{}{161}} +\@writefile{toc}{\contentsline {paragraph}{Note:}{161}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {8.8}{\ignorespaces Plot window in Xcos to read thermistor values and the state of LED\relax }}{162}\protected@file@percent } +\newlabel{fig:therm-buzzer-output}{{8.8}{162}} +\@writefile{toc}{\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{162}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{162}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{162}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{163}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash buzzer.py}{163}\protected@file@percent } +\@writefile{toc}{\contentsline {paragraph}{Note:}{163}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.2}Python Code}{164}\protected@file@percent } +\newlabel{sec:therm-pyhton-code}{{8.6.2}{164}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{1}}{}}{161}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{161}\protected@file@percent } -\newlabel{98@xvr}{{}{161}} -\newlabel{98@vr}{{}{161}} -\newlabel{py:therm-read}{{8.{1}}{161}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{161}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{2}}{}}{162}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{162}\protected@file@percent } -\newlabel{99@xvr}{{}{162}} -\newlabel{99@vr}{{}{162}} -\newlabel{py:therm-buzzer}{{8.{2}}{162}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash buzzer.py}{162}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{163}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{163}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.2}Julia Code}{163}\protected@file@percent } -\newlabel{sec:therm-julia-code}{{8.7.2}{163}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{1}}{}}{164}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{164}\protected@file@percent } +\newlabel{94@xvr}{{}{164}} +\newlabel{94@vr}{{}{164}} +\newlabel{py:therm-read}{{8.{1}}{164}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{164}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{2}}{}}{164}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{164}\protected@file@percent } +\newlabel{95@xvr}{{}{164}} +\newlabel{95@vr}{{}{164}} +\newlabel{py:therm-buzzer}{{8.{2}}{164}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash buzzer.py}{164}\protected@file@percent } +\citation{julia-serial-ports} +\@writefile{toc}{\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{166}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{166}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{166}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{166}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash buzzer.jl}{167}\protected@file@percent } +\@writefile{toc}{\contentsline {paragraph}{Note:}{167}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.2}Julia Code}{167}\protected@file@percent } +\newlabel{sec:therm-julia-code}{{8.7.2}{167}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{163}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{163}\protected@file@percent } -\newlabel{100@xvr}{{}{163}} -\newlabel{100@vr}{{}{163}} -\newlabel{julia:therm-read}{{8.{1}}{163}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{163}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{164}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{164}\protected@file@percent } -\newlabel{101@xvr}{{}{164}} -\newlabel{101@vr}{{}{164}} -\newlabel{julia:therm-buzzer}{{8.{2}}{164}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash buzzer.jl}{164}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{164}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{164}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{165}\protected@file@percent } -\newlabel{sec:therm-OpenModelica-code}{{8.8.2}{165}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{167}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{167}\protected@file@percent } +\newlabel{96@xvr}{{}{167}} +\newlabel{96@vr}{{}{167}} +\newlabel{julia:therm-read}{{8.{1}}{167}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{167}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{167}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{167}\protected@file@percent } +\newlabel{97@xvr}{{}{167}} +\newlabel{97@vr}{{}{167}} +\newlabel{julia:therm-buzzer}{{8.{2}}{167}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash buzzer.jl}{167}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{168}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{168}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{168}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{168}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash buzzer.mo}{169}\protected@file@percent } +\@writefile{toc}{\contentsline {paragraph}{Note:}{169}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{169}\protected@file@percent } +\newlabel{sec:therm-OpenModelica-code}{{8.8.2}{169}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{165}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{165}\protected@file@percent } -\newlabel{102@xvr}{{}{165}} -\newlabel{102@vr}{{}{165}} -\newlabel{OpenModelica:therm-read}{{8.{1}}{165}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{165}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{166}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{166}\protected@file@percent } -\newlabel{103@xvr}{{}{166}} -\newlabel{103@vr}{{}{166}} -\newlabel{OpenModelica:therm-buzzer}{{8.{2}}{166}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash buzzer.mo}{166}\protected@file@percent } -\@writefile{toc}{\contentsline {chapter}{\numberline {9}Controlling a DC motor}{167}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{169}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{169}\protected@file@percent } +\newlabel{98@xvr}{{}{169}} +\newlabel{98@vr}{{}{169}} +\newlabel{OpenModelica:therm-read}{{8.{1}}{169}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{169}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{170}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{170}\protected@file@percent } +\newlabel{99@xvr}{{}{170}} +\newlabel{99@vr}{{}{170}} +\newlabel{OpenModelica:therm-buzzer}{{8.{2}}{170}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash buzzer.mo}{170}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {9}Controlling a DC motor}{173}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} -\newlabel{dcmotor}{{9}{167}} -\@writefile{toc}{\contentsline {section}{\numberline {9.1}Preliminaries}{167}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{168}\protected@file@percent } -\newlabel{fig:motordriverboard}{{9.1}{168}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{169}\protected@file@percent } -\newlabel{fig:dcm-schematic}{{9.2}{169}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{169}\protected@file@percent } -\newlabel{fig:dcmotorconn}{{9.3}{169}} -\@writefile{toc}{\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{169}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{169}\protected@file@percent } -\newlabel{sec:dcm-ard}{{9.2.1}{169}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{1}}{}}{170}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{171}\protected@file@percent } -\newlabel{sec:dcmotor-arduino-code}{{9.2.2}{171}} +\newlabel{dcmotor}{{9}{173}} +\@writefile{toc}{\contentsline {section}{\numberline {9.1}Preliminaries}{173}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{174}\protected@file@percent } +\newlabel{fig:motordriverboard}{{9.1}{174}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{175}\protected@file@percent } +\newlabel{fig:dcm-schematic}{{9.2}{175}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{175}\protected@file@percent } +\newlabel{fig:dcmotorconn}{{9.3}{175}} +\@writefile{toc}{\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{175}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{175}\protected@file@percent } +\newlabel{sec:dcm-ard}{{9.2.1}{175}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{1}}{}}{176}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{177}\protected@file@percent } +\newlabel{sec:dcmotor-arduino-code}{{9.2.2}{177}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{171}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{171}\protected@file@percent } -\newlabel{104@xvr}{{}{171}} -\newlabel{104@vr}{{}{171}} -\newlabel{ard:dcmotor-clock}{{9.{1}}{171}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{171}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{171}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{171}\protected@file@percent } -\newlabel{105@xvr}{{}{171}} -\newlabel{105@vr}{{}{171}} -\newlabel{ard:dcmotor-both}{{9.{2}}{171}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{171}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{171}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{171}\protected@file@percent } -\newlabel{106@xvr}{{}{171}} -\newlabel{106@vr}{{}{171}} -\newlabel{ard:dcmotor-loop}{{9.{3}}{171}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash loop/dcmotor\textendash loop.ino}{172}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{172}\protected@file@percent } -\newlabel{sec:dcm-sci}{{9.3}{172}} -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.1}Initialization}{172}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{173}\protected@file@percent } -\newlabel{table:convention}{{9.1}{173}} -\@writefile{lot}{\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{173}\protected@file@percent } -\newlabel{tab:dcmotor-init}{{9.2}{173}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{173}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{173}\protected@file@percent } -\newlabel{sec:dc-both}{{9.3.2}{173}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{173}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{174}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{174}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{2}}{}}{174}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{174}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{175}\protected@file@percent } -\newlabel{sec:dcmotor-scilab-code}{{9.3.4}{175}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{177}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{177}\protected@file@percent } +\newlabel{100@xvr}{{}{177}} +\newlabel{100@vr}{{}{177}} +\newlabel{ard:dcmotor-clock}{{9.{1}}{177}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{177}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{177}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{177}\protected@file@percent } +\newlabel{101@xvr}{{}{177}} +\newlabel{101@vr}{{}{177}} +\newlabel{ard:dcmotor-both}{{9.{2}}{177}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{177}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{177}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{177}\protected@file@percent } +\newlabel{102@xvr}{{}{177}} +\newlabel{102@vr}{{}{177}} +\newlabel{ard:dcmotor-loop}{{9.{3}}{177}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash loop/dcmotor\textendash loop.ino}{178}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{178}\protected@file@percent } +\newlabel{sec:dcm-sci}{{9.3}{178}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.1}Initialization}{178}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{179}\protected@file@percent } +\newlabel{table:convention}{{9.1}{179}} +\@writefile{lot}{\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{179}\protected@file@percent } +\newlabel{tab:dcmotor-init}{{9.2}{179}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{179}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{179}\protected@file@percent } +\newlabel{sec:dc-both}{{9.3.2}{179}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{179}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{180}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{180}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{2}}{}}{180}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{180}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{181}\protected@file@percent } +\newlabel{sec:dcmotor-scilab-code}{{9.3.4}{181}} \@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{175}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{175}\protected@file@percent } -\newlabel{107@xvr}{{}{175}} -\newlabel{107@vr}{{}{175}} -\newlabel{sci:dcmotor-clock}{{9.{1}}{175}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{175}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{175}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{175}\protected@file@percent } -\newlabel{108@xvr}{{}{175}} -\newlabel{108@vr}{{}{175}} -\newlabel{sci:dcmotor-both}{{9.{2}}{175}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{175}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{175}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{175}\protected@file@percent } -\newlabel{109@xvr}{{}{175}} -\newlabel{109@vr}{{}{175}} -\newlabel{sci:dcmotor-loop}{{9.{3}}{175}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{175}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{176}\protected@file@percent } -\newlabel{111@xvr}{{}{176}} -\newlabel{111@vr}{{}{176}} -\newlabel{fig:dcmotor-clock}{{9.4}{176}} -\@writefile{toc}{\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{176}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{177}\protected@file@percent } -\newlabel{tab:dcmotor-clock}{{9.3}{177}} -\newlabel{112@xvr}{{}{177}} -\newlabel{112@vr}{{}{177}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{3}}{}}{177}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{178}\protected@file@percent } -\newlabel{114@xvr}{{}{178}} -\newlabel{114@vr}{{}{178}} -\newlabel{fig:dcmotor-both}{{9.5}{178}} -\@writefile{lot}{\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{178}\protected@file@percent } -\newlabel{tab:dcmotor-both}{{9.4}{178}} -\newlabel{115@xvr}{{}{178}} -\newlabel{115@vr}{{}{178}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{179}\protected@file@percent } -\newlabel{117@xvr}{{}{179}} -\newlabel{117@vr}{{}{179}} -\newlabel{fig:dcmotor-loop}{{9.6}{179}} -\@writefile{toc}{\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{179}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{179}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{180}\protected@file@percent } -\newlabel{tab:dcmotor-loop}{{9.5}{180}} -\newlabel{118@xvr}{{}{180}} -\newlabel{118@vr}{{}{180}} -\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.2}Python Code}{181}\protected@file@percent } -\newlabel{sec:dcmotor-python-code}{{9.5.2}{181}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{181}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{181}\protected@file@percent } +\newlabel{103@xvr}{{}{181}} +\newlabel{103@vr}{{}{181}} +\newlabel{sci:dcmotor-clock}{{9.{1}}{181}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{181}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{181}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{181}\protected@file@percent } +\newlabel{104@xvr}{{}{181}} +\newlabel{104@vr}{{}{181}} +\newlabel{sci:dcmotor-both}{{9.{2}}{181}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{181}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{181}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{181}\protected@file@percent } +\newlabel{105@xvr}{{}{181}} +\newlabel{105@vr}{{}{181}} +\newlabel{sci:dcmotor-loop}{{9.{3}}{181}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{181}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{182}\protected@file@percent } +\newlabel{107@xvr}{{}{182}} +\newlabel{107@vr}{{}{182}} +\newlabel{fig:dcmotor-clock}{{9.4}{182}} +\@writefile{toc}{\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{182}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{183}\protected@file@percent } +\newlabel{tab:dcmotor-clock}{{9.3}{183}} +\newlabel{108@xvr}{{}{183}} +\newlabel{108@vr}{{}{183}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{3}}{}}{183}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{184}\protected@file@percent } +\newlabel{110@xvr}{{}{184}} +\newlabel{110@vr}{{}{184}} +\newlabel{fig:dcmotor-both}{{9.5}{184}} +\@writefile{lot}{\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{184}\protected@file@percent } +\newlabel{tab:dcmotor-both}{{9.4}{184}} +\newlabel{111@xvr}{{}{184}} +\newlabel{111@vr}{{}{184}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{185}\protected@file@percent } +\newlabel{113@xvr}{{}{185}} +\newlabel{113@vr}{{}{185}} +\newlabel{fig:dcmotor-loop}{{9.6}{185}} +\@writefile{toc}{\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{185}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{185}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{186}\protected@file@percent } +\newlabel{tab:dcmotor-loop}{{9.5}{186}} +\newlabel{114@xvr}{{}{186}} +\newlabel{114@vr}{{}{186}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.2}Python Code}{187}\protected@file@percent } +\newlabel{sec:dcmotor-python-code}{{9.5.2}{187}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{1}}{}}{181}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{181}\protected@file@percent } -\newlabel{119@xvr}{{}{181}} -\newlabel{119@vr}{{}{181}} -\newlabel{py:dcmotor-clock}{{9.{1}}{181}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{181}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{2}}{}}{182}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{182}\protected@file@percent } -\newlabel{120@xvr}{{}{182}} -\newlabel{120@vr}{{}{182}} -\newlabel{py:dcmotor-both}{{9.{2}}{182}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{182}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{3}}{}}{182}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{182}\protected@file@percent } -\newlabel{121@xvr}{{}{183}} -\newlabel{121@vr}{{}{183}} -\newlabel{py:dcmotor-loop}{{9.{3}}{183}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{183}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{184}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{184}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.2}Julia Code}{184}\protected@file@percent } -\newlabel{sec:dcmotor-julia-code}{{9.6.2}{184}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{1}}{}}{187}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{187}\protected@file@percent } +\newlabel{115@xvr}{{}{187}} +\newlabel{115@vr}{{}{187}} +\newlabel{py:dcmotor-clock}{{9.{1}}{187}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{187}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{2}}{}}{188}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{188}\protected@file@percent } +\newlabel{116@xvr}{{}{188}} +\newlabel{116@vr}{{}{188}} +\newlabel{py:dcmotor-both}{{9.{2}}{188}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{188}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{3}}{}}{188}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{188}\protected@file@percent } +\newlabel{117@xvr}{{}{189}} +\newlabel{117@vr}{{}{189}} +\newlabel{py:dcmotor-loop}{{9.{3}}{189}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{189}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{190}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{190}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.2}Julia Code}{190}\protected@file@percent } +\newlabel{sec:dcmotor-julia-code}{{9.6.2}{190}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{184}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{184}\protected@file@percent } -\newlabel{122@xvr}{{}{184}} -\newlabel{122@vr}{{}{184}} -\newlabel{julia:dcmotor-clock}{{9.{1}}{184}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{184}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{185}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{185}\protected@file@percent } -\newlabel{123@xvr}{{}{185}} -\newlabel{123@vr}{{}{185}} -\newlabel{julia:dcmotor-both}{{9.{2}}{185}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{185}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{185}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{185}\protected@file@percent } -\newlabel{124@xvr}{{}{185}} -\newlabel{124@vr}{{}{185}} -\newlabel{julia:dcmotor-loop}{{9.{3}}{185}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{185}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{185}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{185}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{186}\protected@file@percent } -\newlabel{sec:dcmotor-OpenModelica-code}{{9.7.2}{186}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{190}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{190}\protected@file@percent } +\newlabel{118@xvr}{{}{190}} +\newlabel{118@vr}{{}{190}} +\newlabel{julia:dcmotor-clock}{{9.{1}}{190}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{190}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{191}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{191}\protected@file@percent } +\newlabel{119@xvr}{{}{191}} +\newlabel{119@vr}{{}{191}} +\newlabel{julia:dcmotor-both}{{9.{2}}{191}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{191}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{191}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{191}\protected@file@percent } +\newlabel{120@xvr}{{}{191}} +\newlabel{120@vr}{{}{191}} +\newlabel{julia:dcmotor-loop}{{9.{3}}{191}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{191}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{191}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{191}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{192}\protected@file@percent } +\newlabel{sec:dcmotor-OpenModelica-code}{{9.7.2}{192}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{186}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{186}\protected@file@percent } -\newlabel{125@xvr}{{}{186}} -\newlabel{125@vr}{{}{186}} -\newlabel{OpenModelica:dcmotor-clock}{{9.{1}}{186}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{186}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{186}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{186}\protected@file@percent } -\newlabel{126@xvr}{{}{186}} -\newlabel{126@vr}{{}{186}} -\newlabel{OpenModelica:dcmotor-both}{{9.{2}}{186}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{187}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{187}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{187}\protected@file@percent } -\newlabel{127@xvr}{{}{187}} -\newlabel{127@vr}{{}{187}} -\newlabel{OpenModelica:dcmotor-loop}{{9.{3}}{187}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{187}\protected@file@percent } -\@writefile{toc}{\contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{189}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{192}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{192}\protected@file@percent } +\newlabel{121@xvr}{{}{192}} +\newlabel{121@vr}{{}{192}} +\newlabel{OpenModelica:dcmotor-clock}{{9.{1}}{192}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{192}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{192}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{192}\protected@file@percent } +\newlabel{122@xvr}{{}{192}} +\newlabel{122@vr}{{}{192}} +\newlabel{OpenModelica:dcmotor-both}{{9.{2}}{192}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{193}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{193}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{193}\protected@file@percent } +\newlabel{123@xvr}{{}{193}} +\newlabel{123@vr}{{}{193}} +\newlabel{OpenModelica:dcmotor-loop}{{9.{3}}{193}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{193}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{195}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} -\newlabel{sec:servo}{{10}{189}} -\@writefile{toc}{\contentsline {section}{\numberline {10.1}Preliminaries}{189}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {10.1}{\ignorespaces Connecting a typical servomotor to Arduino Uno\ board\relax }}{190}\protected@file@percent } -\newlabel{tab:servo-connect}{{10.1}{190}} -\@writefile{toc}{\contentsline {section}{\numberline {10.2}Controlling the Servometer through the Arduino IDE}{190}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.1}Controlling the Servometer}{190}\protected@file@percent } -\newlabel{sec:servo-ard}{{10.2.1}{190}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{1}}{}}{191}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{191}\protected@file@percent } -\newlabel{sec:servo-arduino-code}{{10.2.2}{191}} +\newlabel{sec:servo}{{10}{195}} +\@writefile{toc}{\contentsline {section}{\numberline {10.1}Preliminaries}{195}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {10.1}{\ignorespaces Connecting a typical servomotor to Arduino Uno\ board\relax }}{196}\protected@file@percent } +\newlabel{tab:servo-connect}{{10.1}{196}} +\@writefile{toc}{\contentsline {section}{\numberline {10.2}Controlling the Servometer through the Arduino IDE}{196}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.1}Controlling the Servometer}{196}\protected@file@percent } +\newlabel{sec:servo-ard}{{10.2.1}{196}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{1}}{}}{197}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{197}\protected@file@percent } +\newlabel{sec:servo-arduino-code}{{10.2.2}{197}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{191}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{191}\protected@file@percent } -\newlabel{128@xvr}{{}{191}} -\newlabel{128@vr}{{}{191}} -\newlabel{ard:servo-init}{{10.{1}}{191}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash init/servo\textendash init.ino}{191}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{192}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{192}\protected@file@percent } -\newlabel{129@xvr}{{}{192}} -\newlabel{129@vr}{{}{192}} -\newlabel{ard:servo-reverse}{{10.{2}}{192}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash reverse/servo\textendash reverse.ino}{192}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{192}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in increments}{192}\protected@file@percent } -\newlabel{130@xvr}{{}{192}} -\newlabel{130@vr}{{}{192}} -\newlabel{ard:servo-loop}{{10.{3}}{192}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash loop/servo\textendash loop.ino}{192}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{4}}{}}{193}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor through the potentiometer}{193}\protected@file@percent } -\newlabel{131@xvr}{{}{193}} -\newlabel{131@vr}{{}{193}} -\newlabel{ard:servo-pot}{{10.{4}}{193}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash pot/servo\textendash pot.ino}{193}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {10.3}Controlling the Servomotor through Scilab}{193}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.1}Controlling the Servomotor}{193}\protected@file@percent } -\newlabel{sec:servo-sci}{{10.3.1}{193}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash init.sce}{193}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{194}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{194}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{194}\protected@file@percent } -\newlabel{sec:servo-scilab-code}{{10.3.2}{194}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{197}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{197}\protected@file@percent } +\newlabel{124@xvr}{{}{197}} +\newlabel{124@vr}{{}{197}} +\newlabel{ard:servo-init}{{10.{1}}{197}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash init/servo\textendash init.ino}{197}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{198}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{198}\protected@file@percent } +\newlabel{125@xvr}{{}{198}} +\newlabel{125@vr}{{}{198}} +\newlabel{ard:servo-reverse}{{10.{2}}{198}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash reverse/servo\textendash reverse.ino}{198}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{198}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in increments}{198}\protected@file@percent } +\newlabel{126@xvr}{{}{198}} +\newlabel{126@vr}{{}{198}} +\newlabel{ard:servo-loop}{{10.{3}}{198}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash loop/servo\textendash loop.ino}{198}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{4}}{}}{199}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor through the potentiometer}{199}\protected@file@percent } +\newlabel{127@xvr}{{}{199}} +\newlabel{127@vr}{{}{199}} +\newlabel{ard:servo-pot}{{10.{4}}{199}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo\textendash pot/servo\textendash pot.ino}{199}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {10.3}Controlling the Servomotor through Scilab}{199}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.1}Controlling the Servomotor}{199}\protected@file@percent } +\newlabel{sec:servo-sci}{{10.3.1}{199}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash init.sce}{199}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{200}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{200}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{200}\protected@file@percent } +\newlabel{sec:servo-scilab-code}{{10.3.2}{200}} \@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{194}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{194}\protected@file@percent } -\newlabel{132@xvr}{{}{194}} -\newlabel{132@vr}{{}{194}} -\newlabel{sci:servo-init}{{10.{1}}{194}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash init.sce}{194}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{194}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{194}\protected@file@percent } -\newlabel{133@xvr}{{}{194}} -\newlabel{133@vr}{{}{194}} -\newlabel{sci:servo-reverse}{{10.{2}}{194}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash reverse.sce}{195}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{195}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{195}\protected@file@percent } -\newlabel{134@xvr}{{}{195}} -\newlabel{134@vr}{{}{195}} -\newlabel{sci:servo-loop}{{10.{3}}{195}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash loop.sce}{195}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{4}}{}}{195}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{195}\protected@file@percent } -\newlabel{135@xvr}{{}{195}} -\newlabel{135@vr}{{}{195}} -\newlabel{sci:servo-pot}{{10.{4}}{195}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{195}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {10.4}Controling the Servomotor through Xcos}{195}\protected@file@percent } -\newlabel{sec:servo-xcos}{{10.4}{195}} -\@writefile{lof}{\contentsline {figure}{\numberline {10.1}{\ignorespaces Rotating the servomotor by a fixed angle}}{196}\protected@file@percent } -\newlabel{137@xvr}{{}{196}} -\newlabel{137@vr}{{}{196}} -\newlabel{fig:servo-init}{{10.1}{196}} -\@writefile{lot}{\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters to rotate the servomotor by $30^\circ $\relax }}{196}\protected@file@percent } -\newlabel{tab:servo-init}{{10.2}{196}} -\newlabel{138@xvr}{{}{196}} -\newlabel{138@vr}{{}{196}} -\@writefile{lof}{\contentsline {figure}{\numberline {10.2}{\ignorespaces Rotating the servomotor forward and then reverse}}{197}\protected@file@percent } -\newlabel{140@xvr}{{}{197}} -\newlabel{140@vr}{{}{197}} -\newlabel{fig:servo-reverse}{{10.2}{197}} -\@writefile{lot}{\contentsline {table}{\numberline {10.3}{\ignorespaces Parameters to rotate the servomotor forward and reverse\relax }}{198}\protected@file@percent } -\newlabel{tab:servo-reverse}{{10.3}{198}} -\newlabel{141@xvr}{{}{198}} -\newlabel{141@vr}{{}{198}} -\@writefile{lof}{\contentsline {figure}{\numberline {10.3}{\ignorespaces Rotating the servomotor in increments of $20^\circ $}}{198}\protected@file@percent } -\newlabel{143@xvr}{{}{198}} -\newlabel{143@vr}{{}{198}} -\newlabel{fig:servo-loop}{{10.3}{198}} -\@writefile{lot}{\contentsline {table}{\numberline {10.4}{\ignorespaces Parameters to make the servomotor to sweep the entire range in increments\relax }}{199}\protected@file@percent } -\newlabel{tab:servo-loop}{{10.4}{199}} -\newlabel{144@xvr}{{}{199}} -\newlabel{144@vr}{{}{199}} -\@writefile{lof}{\contentsline {figure}{\numberline {10.4}{\ignorespaces Rotating the servomotor as suggested by the potentiometer}}{199}\protected@file@percent } -\newlabel{146@xvr}{{}{199}} -\newlabel{146@vr}{{}{199}} -\newlabel{fig:servo-pot}{{10.4}{199}} -\@writefile{lot}{\contentsline {table}{\numberline {10.5}{\ignorespaces Parameters to rotate the servomotor based on the input from the potentiometer\relax }}{200}\protected@file@percent } -\newlabel{tab:servo-pot}{{10.5}{200}} -\newlabel{147@xvr}{{}{200}} -\newlabel{147@vr}{{}{200}} -\@writefile{toc}{\contentsline {section}{\numberline {10.5}Controlling the Servomotor through Python}{200}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.1}Controlling the Servomotor}{200}\protected@file@percent } -\newlabel{sec:servo-py}{{10.5.1}{200}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash init.py}{200}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{201}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{201}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.2}Python Code}{201}\protected@file@percent } -\newlabel{sec:servo-python-code}{{10.5.2}{201}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{200}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{200}\protected@file@percent } +\newlabel{128@xvr}{{}{200}} +\newlabel{128@vr}{{}{200}} +\newlabel{sci:servo-init}{{10.{1}}{200}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash init.sce}{200}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{200}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{200}\protected@file@percent } +\newlabel{129@xvr}{{}{200}} +\newlabel{129@vr}{{}{200}} +\newlabel{sci:servo-reverse}{{10.{2}}{200}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash reverse.sce}{201}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{201}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{201}\protected@file@percent } +\newlabel{130@xvr}{{}{201}} +\newlabel{130@vr}{{}{201}} +\newlabel{sci:servo-loop}{{10.{3}}{201}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash loop.sce}{201}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{4}}{}}{201}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{201}\protected@file@percent } +\newlabel{131@xvr}{{}{201}} +\newlabel{131@vr}{{}{201}} +\newlabel{sci:servo-pot}{{10.{4}}{201}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo\textendash pot.sce}{201}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {10.4}Controling the Servomotor through Xcos}{201}\protected@file@percent } +\newlabel{sec:servo-xcos}{{10.4}{201}} +\@writefile{lof}{\contentsline {figure}{\numberline {10.1}{\ignorespaces Rotating the servomotor by a fixed angle}}{202}\protected@file@percent } +\newlabel{133@xvr}{{}{202}} +\newlabel{133@vr}{{}{202}} +\newlabel{fig:servo-init}{{10.1}{202}} +\@writefile{lot}{\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters to rotate the servomotor by $30^\circ $\relax }}{202}\protected@file@percent } +\newlabel{tab:servo-init}{{10.2}{202}} +\newlabel{134@xvr}{{}{202}} +\newlabel{134@vr}{{}{202}} +\@writefile{lof}{\contentsline {figure}{\numberline {10.2}{\ignorespaces Rotating the servomotor forward and then reverse}}{203}\protected@file@percent } +\newlabel{136@xvr}{{}{203}} +\newlabel{136@vr}{{}{203}} +\newlabel{fig:servo-reverse}{{10.2}{203}} +\@writefile{lot}{\contentsline {table}{\numberline {10.3}{\ignorespaces Parameters to rotate the servomotor forward and reverse\relax }}{204}\protected@file@percent } +\newlabel{tab:servo-reverse}{{10.3}{204}} +\newlabel{137@xvr}{{}{204}} +\newlabel{137@vr}{{}{204}} +\@writefile{lof}{\contentsline {figure}{\numberline {10.3}{\ignorespaces Rotating the servomotor in increments of $20^\circ $}}{204}\protected@file@percent } +\newlabel{139@xvr}{{}{204}} +\newlabel{139@vr}{{}{204}} +\newlabel{fig:servo-loop}{{10.3}{204}} +\@writefile{lot}{\contentsline {table}{\numberline {10.4}{\ignorespaces Parameters to make the servomotor to sweep the entire range in increments\relax }}{205}\protected@file@percent } +\newlabel{tab:servo-loop}{{10.4}{205}} +\newlabel{140@xvr}{{}{205}} +\newlabel{140@vr}{{}{205}} +\@writefile{lof}{\contentsline {figure}{\numberline {10.4}{\ignorespaces Rotating the servomotor as suggested by the potentiometer}}{205}\protected@file@percent } +\newlabel{142@xvr}{{}{205}} +\newlabel{142@vr}{{}{205}} +\newlabel{fig:servo-pot}{{10.4}{205}} +\@writefile{lot}{\contentsline {table}{\numberline {10.5}{\ignorespaces Parameters to rotate the servomotor based on the input from the potentiometer\relax }}{206}\protected@file@percent } +\newlabel{tab:servo-pot}{{10.5}{206}} +\newlabel{143@xvr}{{}{206}} +\newlabel{143@vr}{{}{206}} +\@writefile{toc}{\contentsline {section}{\numberline {10.5}Controlling the Servomotor through Python}{206}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.1}Controlling the Servomotor}{206}\protected@file@percent } +\newlabel{sec:servo-py}{{10.5.1}{206}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash init.py}{206}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{207}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{207}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.2}Python Code}{207}\protected@file@percent } +\newlabel{sec:servo-python-code}{{10.5.2}{207}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{1}}{}}{201}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{201}\protected@file@percent } -\newlabel{148@xvr}{{}{201}} -\newlabel{148@vr}{{}{201}} -\newlabel{py:servo-init}{{10.{1}}{201}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash init.py}{201}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{2}}{}}{202}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{202}\protected@file@percent } -\newlabel{149@xvr}{{}{202}} -\newlabel{149@vr}{{}{202}} -\newlabel{py:servo-reverse}{{10.{2}}{202}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash reverse.py}{202}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{3}}{}}{203}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{203}\protected@file@percent } -\newlabel{150@xvr}{{}{203}} -\newlabel{150@vr}{{}{203}} -\newlabel{sci:servo-loop}{{10.{3}}{203}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash loop.py}{203}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{4}}{}}{204}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{204}\protected@file@percent } -\newlabel{151@xvr}{{}{204}} -\newlabel{151@vr}{{}{204}} -\newlabel{py:servo-pot}{{10.{4}}{204}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{204}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {10.6}Controlling the Servomotor through Julia}{205}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.1}Controlling the Servomotor}{205}\protected@file@percent } -\newlabel{sec:servo-julia}{{10.6.1}{205}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash init.jl}{205}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{206}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{206}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.2}Julia Code}{206}\protected@file@percent } -\newlabel{sec:servo-julia-code}{{10.6.2}{206}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{1}}{}}{207}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{207}\protected@file@percent } +\newlabel{144@xvr}{{}{207}} +\newlabel{144@vr}{{}{207}} +\newlabel{py:servo-init}{{10.{1}}{207}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash init.py}{207}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{2}}{}}{208}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{208}\protected@file@percent } +\newlabel{145@xvr}{{}{208}} +\newlabel{145@vr}{{}{208}} +\newlabel{py:servo-reverse}{{10.{2}}{208}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash reverse.py}{208}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{3}}{}}{209}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{209}\protected@file@percent } +\newlabel{146@xvr}{{}{209}} +\newlabel{146@vr}{{}{209}} +\newlabel{sci:servo-loop}{{10.{3}}{209}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash loop.py}{209}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{4}}{}}{210}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{210}\protected@file@percent } +\newlabel{147@xvr}{{}{210}} +\newlabel{147@vr}{{}{210}} +\newlabel{py:servo-pot}{{10.{4}}{210}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo\textendash pot.py}{210}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {10.6}Controlling the Servomotor through Julia}{211}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.1}Controlling the Servomotor}{211}\protected@file@percent } +\newlabel{sec:servo-julia}{{10.6.1}{211}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash init.jl}{211}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{212}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{212}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.2}Julia Code}{212}\protected@file@percent } +\newlabel{sec:servo-julia-code}{{10.6.2}{212}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{206}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{206}\protected@file@percent } -\newlabel{152@xvr}{{}{206}} -\newlabel{152@vr}{{}{206}} -\newlabel{julia:servo-init}{{10.{1}}{206}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash init.jl}{206}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{206}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{206}\protected@file@percent } -\newlabel{153@xvr}{{}{206}} -\newlabel{153@vr}{{}{206}} -\newlabel{julia:servo-reverse}{{10.{2}}{206}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash reverse.jl}{206}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{207}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{207}\protected@file@percent } -\newlabel{154@xvr}{{}{207}} -\newlabel{154@vr}{{}{207}} -\newlabel{julia:servo-loop}{{10.{3}}{207}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash loop.jl}{207}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{4}}{}}{207}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{207}\protected@file@percent } -\newlabel{155@xvr}{{}{207}} -\newlabel{155@vr}{{}{207}} -\newlabel{julia:servo-pot}{{10.{4}}{207}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{207}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {10.7}Controlling the Servomotor through OpenModelica}{207}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.1}Controlling the Servomotor}{207}\protected@file@percent } -\newlabel{sec:servo-OpenModelica}{{10.7.1}{207}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash init.mo}{208}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{208}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{208}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{208}\protected@file@percent } -\newlabel{sec:servo-OpenModelica-code}{{10.7.2}{208}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{212}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{212}\protected@file@percent } +\newlabel{148@xvr}{{}{212}} +\newlabel{148@vr}{{}{212}} +\newlabel{julia:servo-init}{{10.{1}}{212}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash init.jl}{212}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{212}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{212}\protected@file@percent } +\newlabel{149@xvr}{{}{212}} +\newlabel{149@vr}{{}{212}} +\newlabel{julia:servo-reverse}{{10.{2}}{212}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash reverse.jl}{212}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{213}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{213}\protected@file@percent } +\newlabel{150@xvr}{{}{213}} +\newlabel{150@vr}{{}{213}} +\newlabel{julia:servo-loop}{{10.{3}}{213}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash loop.jl}{213}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{4}}{}}{213}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{213}\protected@file@percent } +\newlabel{151@xvr}{{}{213}} +\newlabel{151@vr}{{}{213}} +\newlabel{julia:servo-pot}{{10.{4}}{213}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo\textendash pot.jl}{213}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {10.7}Controlling the Servomotor through OpenModelica}{213}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.1}Controlling the Servomotor}{213}\protected@file@percent } +\newlabel{sec:servo-OpenModelica}{{10.7.1}{213}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash init.mo}{214}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{214}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{214}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{214}\protected@file@percent } +\newlabel{sec:servo-OpenModelica-code}{{10.7.2}{214}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{208}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{208}\protected@file@percent } -\newlabel{156@xvr}{{}{208}} -\newlabel{156@vr}{{}{208}} -\newlabel{OpenModelica:servo-init}{{10.{1}}{208}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash init.mo}{208}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{209}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{209}\protected@file@percent } -\newlabel{157@xvr}{{}{209}} -\newlabel{157@vr}{{}{209}} -\newlabel{OpenModelica:servo-reverse}{{10.{2}}{209}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash reverse.mo}{209}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{210}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{210}\protected@file@percent } -\newlabel{158@xvr}{{}{210}} -\newlabel{158@vr}{{}{210}} -\newlabel{OpenModelica:servo-loop}{{10.{3}}{210}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash loop.mo}{210}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{4}}{}}{210}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{210}\protected@file@percent } -\newlabel{159@xvr}{{}{210}} -\newlabel{159@vr}{{}{210}} -\newlabel{OpenModelica:servo-pot}{{10.{4}}{210}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{211}\protected@file@percent } -\@writefile{toc}{\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{213}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{214}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{214}\protected@file@percent } +\newlabel{152@xvr}{{}{214}} +\newlabel{152@vr}{{}{214}} +\newlabel{OpenModelica:servo-init}{{10.{1}}{214}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash init.mo}{214}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{215}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{215}\protected@file@percent } +\newlabel{153@xvr}{{}{215}} +\newlabel{153@vr}{{}{215}} +\newlabel{OpenModelica:servo-reverse}{{10.{2}}{215}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash reverse.mo}{215}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{216}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{216}\protected@file@percent } +\newlabel{154@xvr}{{}{216}} +\newlabel{154@vr}{{}{216}} +\newlabel{OpenModelica:servo-loop}{{10.{3}}{216}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textendash loop.mo}{216}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{4}}{}}{216}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{216}\protected@file@percent } +\newlabel{155@xvr}{{}{216}} +\newlabel{155@vr}{{}{216}} +\newlabel{OpenModelica:servo-pot}{{10.{4}}{216}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{217}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{219}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} -\newlabel{modbus}{{11}{213}} -\@writefile{toc}{\contentsline {section}{\numberline {11.1}Preliminaries}{213}\protected@file@percent } -\newlabel{fig:mod-block}{{\caption@xref {fig:mod-block}{ on input line 72}}{214}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{214}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{214}\protected@file@percent } -\newlabel{fig:mod-master-slave}{{11.2}{214}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{215}\protected@file@percent } -\newlabel{fig:rs-485}{{11.3}{215}} -\@writefile{lot}{\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{216}\protected@file@percent } -\newlabel{tab:request-packet}{{11.1}{216}} -\@writefile{lot}{\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{216}\protected@file@percent } -\newlabel{tab:response-packet}{{11.2}{216}} -\@writefile{lot}{\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{217}\protected@file@percent } -\newlabel{tab:ieee-decimal}{{11.3}{217}} -\@writefile{lot}{\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{217}\protected@file@percent } -\newlabel{tab:single-precision}{{11.4}{217}} -\@writefile{toc}{\contentsline {section}{\numberline {11.2}Objective}{218}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{218}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{219}\protected@file@percent } -\newlabel{fig:full-set-up}{{11.4}{219}} -\@writefile{toc}{\contentsline {section}{\numberline {11.4}Software}{219}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{220}\protected@file@percent } -\newlabel{fig:block-diagram}{{11.5}{220}} -\@writefile{toc}{\contentsline {section}{\numberline {11.5}Output}{220}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{221}\protected@file@percent } -\newlabel{fig:modbus-firmware}{{11.6}{221}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{222}\protected@file@percent } -\newlabel{fig:flow-chart}{{11.7}{222}} -\@writefile{toc}{\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{222}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{223}\protected@file@percent } -\newlabel{fig:current-console}{{11.8}{223}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{223}\protected@file@percent } -\newlabel{fig:current-meter}{{11.9}{223}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{224}\protected@file@percent } -\newlabel{fig:voltage-console}{{11.10}{224}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{224}\protected@file@percent } -\newlabel{fig:voltage-meter}{{11.11}{224}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{225}\protected@file@percent } -\newlabel{fig:power-console}{{11.12}{225}} -\@writefile{lof}{\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{225}\protected@file@percent } -\newlabel{fig:power-meter}{{11.13}{225}} -\@writefile{toc}{\contentsline {section}{\numberline {11.7}Code}{225}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{225}\protected@file@percent } -\newlabel{sec:firmware-modbus}{{11.7.1}{225}} +\newlabel{modbus}{{11}{219}} +\@writefile{toc}{\contentsline {section}{\numberline {11.1}Preliminaries}{219}\protected@file@percent } +\newlabel{fig:mod-block}{{\caption@xref {fig:mod-block}{ on input line 72}}{220}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{220}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{220}\protected@file@percent } +\newlabel{fig:mod-master-slave}{{11.2}{220}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{221}\protected@file@percent } +\newlabel{fig:rs-485}{{11.3}{221}} +\@writefile{lot}{\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{222}\protected@file@percent } +\newlabel{tab:request-packet}{{11.1}{222}} +\@writefile{lot}{\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{222}\protected@file@percent } +\newlabel{tab:response-packet}{{11.2}{222}} +\@writefile{lot}{\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{223}\protected@file@percent } +\newlabel{tab:ieee-decimal}{{11.3}{223}} +\@writefile{lot}{\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{223}\protected@file@percent } +\newlabel{tab:single-precision}{{11.4}{223}} +\@writefile{toc}{\contentsline {section}{\numberline {11.2}Objective}{224}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{224}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{225}\protected@file@percent } +\newlabel{fig:full-set-up}{{11.4}{225}} +\@writefile{toc}{\contentsline {section}{\numberline {11.4}Software}{225}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{226}\protected@file@percent } +\newlabel{fig:block-diagram}{{11.5}{226}} +\@writefile{toc}{\contentsline {section}{\numberline {11.5}Output}{226}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{227}\protected@file@percent } +\newlabel{fig:modbus-firmware}{{11.6}{227}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{228}\protected@file@percent } +\newlabel{fig:flow-chart}{{11.7}{228}} +\@writefile{toc}{\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{228}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{229}\protected@file@percent } +\newlabel{fig:current-console}{{11.8}{229}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{229}\protected@file@percent } +\newlabel{fig:current-meter}{{11.9}{229}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{230}\protected@file@percent } +\newlabel{fig:voltage-console}{{11.10}{230}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{230}\protected@file@percent } +\newlabel{fig:voltage-meter}{{11.11}{230}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{231}\protected@file@percent } +\newlabel{fig:power-console}{{11.12}{231}} +\@writefile{lof}{\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{231}\protected@file@percent } +\newlabel{fig:power-meter}{{11.13}{231}} +\@writefile{toc}{\contentsline {section}{\numberline {11.7}Code}{231}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{231}\protected@file@percent } +\newlabel{sec:firmware-modbus}{{11.7.1}{231}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{225}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{225}\protected@file@percent } -\newlabel{162@xvr}{{}{225}} -\newlabel{162@vr}{{}{225}} -\newlabel{ard:firmware-modbus}{{11.{1}}{225}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send\textunderscore packet.ino}{225}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{226}\protected@file@percent } -\newlabel{161@xvr}{{}{226}} -\newlabel{161@vr}{{}{226}} -\newlabel{fig:mod-read}{{11.14}{226}} -\@writefile{lot}{\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{226}\protected@file@percent } -\newlabel{tab:mod-xcos-read}{{11.5}{226}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{227}\protected@file@percent } -\newlabel{sec:modbus-scilab-code}{{11.7.2}{227}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{231}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{231}\protected@file@percent } +\newlabel{158@xvr}{{}{231}} +\newlabel{158@vr}{{}{231}} +\newlabel{ard:firmware-modbus}{{11.{1}}{231}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send\textunderscore packet.ino}{231}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{232}\protected@file@percent } +\newlabel{157@xvr}{{}{232}} +\newlabel{157@vr}{{}{232}} +\newlabel{fig:mod-read}{{11.14}{232}} +\@writefile{lot}{\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{232}\protected@file@percent } +\newlabel{tab:mod-xcos-read}{{11.5}{232}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{233}\protected@file@percent } +\newlabel{sec:modbus-scilab-code}{{11.7.2}{233}} \@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{227}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{227}\protected@file@percent } -\newlabel{163@xvr}{{}{227}} -\newlabel{163@vr}{{}{227}} -\newlabel{sci:current-modbus}{{11.{1}}{227}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore val.sce}{227}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{227}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{227}\protected@file@percent } -\newlabel{164@xvr}{{}{227}} -\newlabel{164@vr}{{}{227}} -\newlabel{sci:current-modbus}{{11.{2}}{227}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore current.sci}{227}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{227}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{227}\protected@file@percent } -\newlabel{165@xvr}{{}{227}} -\newlabel{165@vr}{{}{227}} -\newlabel{sci:voltage-modbus}{{11.{3}}{227}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore voltage.sci}{227}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{228}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{228}\protected@file@percent } -\newlabel{166@xvr}{{}{228}} -\newlabel{166@vr}{{}{228}} -\newlabel{sci:modbus-power}{{11.{4}}{228}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore active\textunderscore power.sci}{228}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.3}Python Code}{228}\protected@file@percent } -\newlabel{sec:modbus-python-code}{{11.7.3}{228}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{233}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{233}\protected@file@percent } +\newlabel{159@xvr}{{}{233}} +\newlabel{159@vr}{{}{233}} +\newlabel{sci:current-modbus}{{11.{1}}{233}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore val.sce}{233}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{233}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{233}\protected@file@percent } +\newlabel{160@xvr}{{}{233}} +\newlabel{160@vr}{{}{233}} +\newlabel{sci:current-modbus}{{11.{2}}{233}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore current.sci}{233}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{233}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{233}\protected@file@percent } +\newlabel{161@xvr}{{}{233}} +\newlabel{161@vr}{{}{233}} +\newlabel{sci:voltage-modbus}{{11.{3}}{233}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore voltage.sci}{233}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{234}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{234}\protected@file@percent } +\newlabel{162@xvr}{{}{234}} +\newlabel{162@vr}{{}{234}} +\newlabel{sci:modbus-power}{{11.{4}}{234}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore active\textunderscore power.sci}{234}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.3}Python Code}{234}\protected@file@percent } +\newlabel{sec:modbus-python-code}{{11.7.3}{234}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{1}}{}}{228}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{228}\protected@file@percent } -\newlabel{167@xvr}{{}{228}} -\newlabel{167@vr}{{}{228}} -\newlabel{py:current-modbus}{{11.{1}}{228}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore current.py}{228}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{2}}{}}{228}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{228}\protected@file@percent } -\newlabel{168@xvr}{{}{228}} -\newlabel{168@vr}{{}{228}} -\newlabel{py:voltage-modbus}{{11.{2}}{228}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore voltage.py}{228}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{3}}{}}{229}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{229}\protected@file@percent } -\newlabel{169@xvr}{{}{229}} -\newlabel{169@vr}{{}{229}} -\newlabel{py:modbus-power}{{11.{3}}{229}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore active\textunderscore power.py}{229}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.4}Julia Code}{229}\protected@file@percent } -\newlabel{sec:modbus-julia-code}{{11.7.4}{229}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{1}}{}}{234}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{234}\protected@file@percent } +\newlabel{163@xvr}{{}{234}} +\newlabel{163@vr}{{}{234}} +\newlabel{py:current-modbus}{{11.{1}}{234}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore current.py}{234}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{2}}{}}{234}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{234}\protected@file@percent } +\newlabel{164@xvr}{{}{234}} +\newlabel{164@vr}{{}{234}} +\newlabel{py:voltage-modbus}{{11.{2}}{234}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore voltage.py}{234}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{3}}{}}{235}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{235}\protected@file@percent } +\newlabel{165@xvr}{{}{235}} +\newlabel{165@vr}{{}{235}} +\newlabel{py:modbus-power}{{11.{3}}{235}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore active\textunderscore power.py}{235}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.4}Julia Code}{235}\protected@file@percent } +\newlabel{sec:modbus-julia-code}{{11.7.4}{235}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{229}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{229}\protected@file@percent } -\newlabel{170@xvr}{{}{229}} -\newlabel{170@vr}{{}{229}} -\newlabel{julia:current-modbus}{{11.{1}}{229}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.jl}{229}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{229}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{229}\protected@file@percent } -\newlabel{171@xvr}{{}{229}} -\newlabel{171@vr}{{}{229}} -\newlabel{julia:voltage-modbus}{{11.{2}}{229}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.jl}{229}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{230}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{230}\protected@file@percent } -\newlabel{172@xvr}{{}{230}} -\newlabel{172@vr}{{}{230}} -\newlabel{julia:modbus-power}{{11.{3}}{230}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl}{230}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{230}\protected@file@percent } -\newlabel{sec:modbus-OpenModelica-code}{{11.7.5}{230}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{235}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{235}\protected@file@percent } +\newlabel{166@xvr}{{}{235}} +\newlabel{166@vr}{{}{235}} +\newlabel{julia:current-modbus}{{11.{1}}{235}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.jl}{235}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{235}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{235}\protected@file@percent } +\newlabel{167@xvr}{{}{235}} +\newlabel{167@vr}{{}{235}} +\newlabel{julia:voltage-modbus}{{11.{2}}{235}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.jl}{235}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{236}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{236}\protected@file@percent } +\newlabel{168@xvr}{{}{236}} +\newlabel{168@vr}{{}{236}} +\newlabel{julia:modbus-power}{{11.{3}}{236}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl}{236}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{236}\protected@file@percent } +\newlabel{sec:modbus-OpenModelica-code}{{11.7.5}{236}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{230}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{230}\protected@file@percent } -\newlabel{173@xvr}{{}{230}} -\newlabel{173@vr}{{}{230}} -\newlabel{OpenModelica:current-modbus}{{11.{1}}{230}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCurrent.mo}{230}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{230}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{230}\protected@file@percent } -\newlabel{174@xvr}{{}{230}} -\newlabel{174@vr}{{}{230}} -\newlabel{OpenModelica:voltage-modbus}{{11.{2}}{230}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVoltage.mo}{230}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{236}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{236}\protected@file@percent } +\newlabel{169@xvr}{{}{236}} +\newlabel{169@vr}{{}{236}} +\newlabel{OpenModelica:current-modbus}{{11.{1}}{236}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCurrent.mo}{236}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{236}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{236}\protected@file@percent } +\newlabel{170@xvr}{{}{236}} +\newlabel{170@vr}{{}{236}} +\newlabel{OpenModelica:voltage-modbus}{{11.{2}}{236}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVoltage.mo}{236}\protected@file@percent } \bibdata{bibliography.bib} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{231}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{231}\protected@file@percent } -\newlabel{175@xvr}{{}{231}} -\newlabel{175@vr}{{}{231}} -\newlabel{OpenModelica:modbus-power}{{11.{3}}{231}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPower.mo}{231}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{237}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{237}\protected@file@percent } +\newlabel{171@xvr}{{}{237}} +\newlabel{171@vr}{{}{237}} +\newlabel{OpenModelica:modbus-power}{{11.{3}}{237}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPower.mo}{237}\protected@file@percent } \bibcite{CNES-Scilab}{1} \bibcite{scilab-arduino}{2} \bibcite{oshw-ref}{3} @@ -1568,9 +1584,10 @@ \bibcite{scilab-ref}{12} \bibcite{scilab-interop}{13} \bibcite{xcos-ref}{14} -\@writefile{toc}{\contentsline {chapter}{\numberline {References}}{233}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {References}}{239}\protected@file@percent } \bibcite{python-ref}{15} \bibcite{pySerial}{16} \bibcite{julia-ref}{17} \bibcite{julia-serial-ports}{18} \bibcite{om-ref}{19} +\bibcite{therm-wiki}{20} diff --git a/floss-arduino.bbl b/floss-arduino.bbl index 1c2986f..ffcc6d7 100644 --- a/floss-arduino.bbl +++ b/floss-arduino.bbl @@ -101,4 +101,9 @@ python.org. \newblock https://www.openmodelica.org/. \newblock Seen on 2 April 2021. +\bibitem{therm-wiki} +Thermistor - wikipedia. +\newblock https://en.wikipedia.org/wiki/Thermistor. +\newblock Seen on 2 May 2021. + \end{thebibliography} diff --git a/floss-arduino.blg b/floss-arduino.blg index e8f24ac..66b45de 100644 --- a/floss-arduino.blg +++ b/floss-arduino.blg @@ -3,46 +3,44 @@ Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 The top-level auxiliary file: floss-arduino.aux The style file: unsrt.bst Database file #1: bibliography.bib -Warning--I didn't find a database entry for "therm-wiki" -You've used 19 entries, +You've used 20 entries, 1791 wiz_defined-function locations, - 512 strings with 5131 characters, -and the built_in function-call counts, 2168 in all, are: -= -- 196 -> -- 28 + 515 strings with 5211 characters, +and the built_in function-call counts, 2277 in all, are: += -- 206 +> -- 29 < -- 0 -+ -- 22 ++ -- 23 - -- 3 * -- 2 -:= -- 250 -add.period$ -- 60 -call.type$ -- 19 -change.case$ -- 19 +:= -- 261 +add.period$ -- 63 +call.type$ -- 20 +change.case$ -- 20 chr.to.int$ -- 0 -cite$ -- 19 -duplicate$ -- 95 -empty$ -- 343 +cite$ -- 20 +duplicate$ -- 100 +empty$ -- 361 format.name$ -- 3 -if$ -- 561 +if$ -- 590 int.to.chr$ -- 0 -int.to.str$ -- 19 +int.to.str$ -- 20 missing$ -- 0 -newline$ -- 101 +newline$ -- 106 num.names$ -- 3 -pop$ -- 149 +pop$ -- 157 preamble$ -- 1 purify$ -- 0 quote$ -- 0 -skip$ -- 53 +skip$ -- 56 stack$ -- 0 substring$ -- 0 -swap$ -- 19 +swap$ -- 20 text.length$ -- 0 text.prefix$ -- 0 top$ -- 0 type$ -- 0 warning$ -- 0 while$ -- 3 -width$ -- 21 -write$ -- 179 -(There was 1 warning) +width$ -- 22 +write$ -- 188 diff --git a/floss-arduino.cod b/floss-arduino.cod index 6b5cc64..bc30fd7 100644 --- a/floss-arduino.cod +++ b/floss-arduino.cod @@ -16,19 +16,19 @@ \addvspace {10pt} \contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{140}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{156}% -\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{156}% -\addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{175}% -\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{175}% -\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{175}% -\addvspace {10pt} -\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{194}% -\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{194}% -\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{195}% -\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{195}% -\addvspace {10pt} -\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{227}% -\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{227}% -\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{227}% -\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{228}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{157}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{158}% +\addvspace {10pt} +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{181}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{181}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{181}% +\addvspace {10pt} +\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{200}% +\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{200}% +\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{201}% +\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{201}% +\addvspace {10pt} +\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{233}% +\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{233}% +\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{233}% +\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{234}% diff --git a/floss-arduino.fdb_latexmk b/floss-arduino.fdb_latexmk index 58a4453..ce2d5b5 100644 --- a/floss-arduino.fdb_latexmk +++ b/floss-arduino.fdb_latexmk @@ -1,19 +1,19 @@ # Fdb version 3 -["bibtex floss-arduino"] 1619921561 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1619921643 +["bibtex floss-arduino"] 1620004082 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1620004233 "/usr/share/texlive/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 "" - "bibliography.bib" 1619058609 4121 e0d02327e4bb995867623cd1f708046e "" - "floss-arduino.aux" 1619921569 135106 08e030251e086e5b840984727fc4afb7 "pdflatex" + "bibliography.bib" 1619993144 4331 898f586dba696884b42be7c094b1315e "" + "floss-arduino.aux" 1620004232 137803 8bfc645d97fee466fb695739418c3ea0 "pdflatex" (generated) "floss-arduino.blg" "floss-arduino.bbl" -["makeindex floss-arduino.idx"] 1619906358 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1619921643 - "floss-arduino.idx" 1619921569 187 99a340d76cc05a666a957e86687e46a4 "pdflatex" +["makeindex floss-arduino.idx"] 1620004082 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1620004233 + "floss-arduino.idx" 1620004232 187 dcf8a889d1a3d335c15321e8b47c70af "pdflatex" (generated) - "floss-arduino.ilg" "floss-arduino.ind" -["pdflatex"] 1619921561 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1619921643 + "floss-arduino.ilg" +["pdflatex"] 1620004224 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1620004233 "/etc/texmf/web2c/texmf.cnf" 1602253014 475 c0e671620eb5563b2130f56340a5fde8 "" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1619921569 135106 08e030251e086e5b840984727fc4afb7 "" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1620004232 137803 8bfc645d97fee466fb695739418c3ea0 "" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" 1619403261 4558 99e8133d713ce68a01e2f2b59b0d6baf "" "/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc" 1165713224 4850 80dc9bab7f31fb78a000ccfed0e27cab "" "/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" @@ -138,18 +138,18 @@ "/usr/share/texmf/web2c/texmf.cnf" 1581979058 38841 ce3692aa899bb693b90b87eaa5d4d84e "" "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1604540077 4770781 1ed1abab22da9c3e2cc82e4db562318b "" "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1604540101 8258883 e8330f8aa4fe7c6cdcf08bf0b72237fd "" - "floss-arduino.OpenModelicad" 1619921569 2303 0b54f632689ef31f405a149c30111a7d "pdflatex" - "floss-arduino.ard" 1619921569 2081 6407f88f364b22d861bc7b888331a36c "pdflatex" - "floss-arduino.aux" 1619921569 135106 08e030251e086e5b840984727fc4afb7 "pdflatex" - "floss-arduino.bbl" 1619921561 2654 051fbb0ca9f90e7ce7d2577998098d98 "bibtex floss-arduino" - "floss-arduino.cod" 1619921569 2505 9fd134b95bd4f97377f3625aeb93b136 "pdflatex" - "floss-arduino.ind" 1619906358 228 e5d1fef782bcddcfa72d95954d41f91d "makeindex floss-arduino.idx" - "floss-arduino.juliad" 1619921569 2337 f96b528a88c0f4788147a60d14d47aed "pdflatex" - "floss-arduino.lof" 1619921569 13294 1ef83844f49b6507cee6fce8109b0d40 "pdflatex" - "floss-arduino.lot" 1619921569 3702 9b6553174359ac2f9a780b3123c58a4c "pdflatex" - "floss-arduino.pyd" 1619921569 2332 7b520c7ffc711bd57d4cd91f82470eda "pdflatex" + "floss-arduino.OpenModelicad" 1620004232 2303 51deaa312371307adb5901ac4366a580 "pdflatex" + "floss-arduino.ard" 1620004232 2081 dda8c65de0d2953bf41194263fe92b4b "pdflatex" + "floss-arduino.aux" 1620004232 137803 8bfc645d97fee466fb695739418c3ea0 "pdflatex" + "floss-arduino.bbl" 1620004083 2782 f2a4ed925cf6e3e12688ffdf458c1df4 "bibtex floss-arduino" + "floss-arduino.cod" 1620004232 2505 8dab91c620da18100f500ed55bdfe272 "pdflatex" + "floss-arduino.ind" 1620004082 228 3b82961b4e725f6037e1e500c4583f23 "makeindex floss-arduino.idx" + "floss-arduino.juliad" 1620004232 2337 fad3bb9035b746182d84a708d50b7809 "pdflatex" + "floss-arduino.lof" 1620004232 13306 e9531397268dcf377d3faebedb06e646 "pdflatex" + "floss-arduino.lot" 1620004232 3702 a9bb81bf6b50f71cc0c5d9311f440fa2 "pdflatex" + "floss-arduino.pyd" 1620004232 2332 d7197865bf1d028ba5b9cbe19639e8b0 "pdflatex" "floss-arduino.tex" 1619403261 4558 99e8133d713ce68a01e2f2b59b0d6baf "" - "floss-arduino.toc" 1619921569 15496 ce587111ce7e7c8b9f97f15f5921668a "pdflatex" + "floss-arduino.toc" 1620004232 15730 9598f17f17df2a32992f73e792130ac1 "pdflatex" "suppl/acr.tex" 1615963613 1926 fd6481c4666ee0d60331b7d4cc24b645 "" "suppl/intro.tex" 1615963613 3437 b09628cf9e20fe17fa65b37a5997653c "" "suppl/styles.tex" 1615963613 8143 aa3280f0b59c8631fe8ec44895c9e871 "" @@ -211,7 +211,7 @@ "user-code/ldr/figures/ldr_sym.png" 1615963614 29267 73b70e220429569a98caa86348349aa1 "" "user-code/ldr/julia/ldr-led.jl" 1619893631 309 6120f21761a761fee1f0c75aea7f2c4b "" "user-code/ldr/julia/ldr-read.jl" 1619893494 183 4091d446a9adbb94d781d09d5b88abdb "" - "user-code/ldr/ldr.tex" 1619907470 33766 0099248cb942b8d4850e062df2a34f61 "" + "user-code/ldr/ldr.tex" 1620002657 37062 3171dbd9f43010995d720b55f3a1cc47 "" "user-code/ldr/python/ldr-led.py" 1619892876 881 dbda35c83c7ff7483db6c9bd8a6b3a63 "" "user-code/ldr/python/ldr-read.py" 1619892935 690 aa838d76cfdd26b26fb76e669b4ff0dd "" "user-code/ldr/scilab/ldr-led.sce" 1619881130 474 be365b56cb8d934670aab6d7d4b2e04b "" @@ -367,10 +367,10 @@ "user-code/sw-env/figures/windows-cmd.png" 1619057155 18559 6c4f07f73f86b74127aa8c76e23f3285 "" "user-code/sw-env/figures/xcos-help.png" 1615963614 87275 3c9b5157ebebe381cd7b5281cdd28482 "" "user-code/sw-env/sw-env.tex" 1619780680 91708 95fa657c1f21492e2c046423c051522a "" - "user-code/thermistor/OpenModelica/therm-buzzer.mo" 1619403721 1236 1f7c67893d838969538060ecfe0ab777 "" - "user-code/thermistor/OpenModelica/therm-read.mo" 1619403730 992 a6a3e7a260be69141ff1a6be804a9ae5 "" - "user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino" 1615963614 389 c4216c80dfb4f1f23b090c94fd181a05 "" - "user-code/thermistor/arduino/therm-read/therm-read.ino" 1615963614 221 de622bbb1d39cb66ab1a45e015351b9d "" + "user-code/thermistor/OpenModelica/therm-buzzer.mo" 1620004140 1278 b94c7cf5dd68dce62a0a370ed3f040ec "" + "user-code/thermistor/OpenModelica/therm-read.mo" 1620003767 974 d6b23e12e1c2c31d6a4659187a83179b "" + "user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino" 1619997231 395 6cb49588d40329f1925dc1dfd3472698 "" + "user-code/thermistor/arduino/therm-read/therm-read.ino" 1619993398 222 56d68b7abcb21fae9c06e62feabcba30 "" "user-code/thermistor/figures/BUZZER-Diagram-crop.pdf" 1615963614 44580 9821d615a59f54c353650c91d53397ff "" "user-code/thermistor/figures/NTC-bead.jpg" 1615963614 26322 dc48012480bf36dffe1bc53f53fff468 "" "user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf" 1615963614 51122 63d1034bfec8c1e50343da5dd4e8a355 "" @@ -381,26 +381,26 @@ "user-code/thermistor/figures/therm-sym.png" 1615963614 17914 5c4de58664f2c605c14ebafd7187b119 "" "user-code/thermistor/figures/thermistor-buzzer.png" 1617904904 251485 47e52a1b05f033ac5efc513d0c38b843 "" "user-code/thermistor/figures/thermistor.png" 1617904875 227111 a497c7b79fab30a854e897df8f7b9e5a "" - "user-code/thermistor/julia/therm-buzzer.jl" 1618063930 303 ecffb0efb608a5cf7b763adc820a95a7 "" - "user-code/thermistor/julia/therm-read.jl" 1618079676 178 dd878911ab553df01a9054408ce336a9 "" - "user-code/thermistor/python/therm-buzzer.py" 1567597218 928 ed9f475c9ed1b48df0336865cc08a77e "" - "user-code/thermistor/python/therm-read.py" 1567597204 756 69346d8630af0b54c8fd104e83808e25 "" - "user-code/thermistor/scilab/therm-buzzer.sce" 1615963614 474 a5b32bd97a4179f7ac211aacf488dad3 "" - "user-code/thermistor/scilab/therm-read.sce" 1615963614 382 5e743c25b50f9d961a2939ce81d7b633 "" - "user-code/thermistor/thermistor.tex" 1619882138 25843 b904c3ccf09d2c95870db0e6590677f9 "" + "user-code/thermistor/julia/therm-buzzer.jl" 1620002827 331 6fe5d5569b5d126893e493a0d0da0da0 "" + "user-code/thermistor/julia/therm-read.jl" 1620002804 183 640b24fbc4b351c3ad132e1f06e21993 "" + "user-code/thermistor/python/therm-buzzer.py" 1620002419 930 584cfa6298da8de633afd17f23c7d1b6 "" + "user-code/thermistor/python/therm-read.py" 1620002454 748 cba86aade80fa8215987d3707938af4c "" + "user-code/thermistor/scilab/therm-buzzer.sce" 1619998577 499 2136a058a640f1e79d01d3145f53ccb2 "" + "user-code/thermistor/scilab/therm-read.sce" 1619998644 399 3d4d94a3003c16014a51200a9b472b66 "" + "user-code/thermistor/thermistor.tex" 1620004224 41305 bda4a0b00891126e6a0ed71437360cac "" (generated) "floss-arduino.ard" - "floss-arduino.cod" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" - "floss-arduino.juliad" - "floss-arduino.pyd" - "floss-arduino.log" "floss-arduino.idx" + "floss-arduino.thm" + "floss-arduino.pdf" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" - "floss-arduino.lot" "floss-arduino.lof" + "floss-arduino.OpenModelicad" + "floss-arduino.lot" "floss-arduino.aux" "floss-arduino.toc" - "floss-arduino.thm" - "floss-arduino.OpenModelicad" - "floss-arduino.pdf" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" + "floss-arduino.pyd" + "floss-arduino.log" + "floss-arduino.juliad" + "floss-arduino.cod" diff --git a/floss-arduino.fls b/floss-arduino.fls index 54118ed..ac7180d 100644 --- a/floss-arduino.fls +++ b/floss-arduino.fls @@ -826,6 +826,9 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/the INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino @@ -835,6 +838,15 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/the INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce @@ -853,9 +865,27 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buzzer.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buzzer.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buzzer.jl INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl @@ -865,6 +895,15 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo diff --git a/floss-arduino.idx b/floss-arduino.idx index bcf0b4b..7da1188 100644 --- a/floss-arduino.idx +++ b/floss-arduino.idx @@ -1,5 +1,5 @@ -\indexentry{H-Bridge circuit DC motor}{167} -\indexentry{H-Bridge}{167} -\indexentry{L293D,L298}{167} -\indexentry{PCB breakout board}{167} -\indexentry{pulse width modulation, PWM}{167} +\indexentry{H-Bridge circuit DC motor}{173} +\indexentry{H-Bridge}{173} +\indexentry{L293D,L298}{173} +\indexentry{PCB breakout board}{173} +\indexentry{pulse width modulation, PWM}{173} diff --git a/floss-arduino.ind b/floss-arduino.ind index ab9a708..407cf6b 100644 --- a/floss-arduino.ind +++ b/floss-arduino.ind @@ -1,15 +1,15 @@ \begin{theindex} - \item H-Bridge, 167 - \item H-Bridge circuit DC motor, 167 + \item H-Bridge, 173 + \item H-Bridge circuit DC motor, 173 \indexspace - \item L293D,L298, 167 + \item L293D,L298, 173 \indexspace - \item PCB breakout board, 167 - \item pulse width modulation, PWM, 167 + \item PCB breakout board, 173 + \item pulse width modulation, PWM, 173 \end{theindex} diff --git a/floss-arduino.juliad b/floss-arduino.juliad index 33f852a..845590d 100644 --- a/floss-arduino.juliad +++ b/floss-arduino.juliad @@ -13,18 +13,18 @@ \addvspace {10pt} \contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{145}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{163}% -\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{164}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{167}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{167}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{184}% -\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{185}% -\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{185}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{190}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{191}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{191}% \addvspace {10pt} -\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{206}% -\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{206}% -\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{207}% -\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{207}% +\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{212}% +\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{212}% +\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{213}% +\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{213}% \addvspace {10pt} -\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{229}% -\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{229}% -\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{230}% +\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{235}% +\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{235}% +\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{236}% diff --git a/floss-arduino.lof b/floss-arduino.lof index 233fe58..0751ba8 100644 --- a/floss-arduino.lof +++ b/floss-arduino.lof @@ -98,34 +98,34 @@ \contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Buzzer connection diagram}}}{150}% \contentsline {figure}{\numberline {8.3}{\ignorespaces A thermistor to read its values with Arduino Uno using a breadboard\relax }}{151}% \contentsline {figure}{\numberline {8.4}{\ignorespaces A thermistor to control a buzzer with Arduino Uno using a breadboard\relax }}{152}% -\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{157}% -\contentsline {figure}{\numberline {8.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{158}% -\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{159}% -\contentsline {figure}{\numberline {8.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{159}% +\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{159}% +\contentsline {figure}{\numberline {8.6}{\ignorespaces Plot window in Xcos to read thermistor values\relax }}{160}% +\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{160}% +\contentsline {figure}{\numberline {8.8}{\ignorespaces Plot window in Xcos to read thermistor values and the state of LED\relax }}{162}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{168}% -\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{169}% -\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{169}% -\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{176}% -\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{178}% -\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{179}% +\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{174}% +\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{175}% +\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{175}% +\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{182}% +\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{184}% +\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{185}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {10.1}{\ignorespaces Rotating the servomotor by a fixed angle}}{196}% -\contentsline {figure}{\numberline {10.2}{\ignorespaces Rotating the servomotor forward and then reverse}}{197}% -\contentsline {figure}{\numberline {10.3}{\ignorespaces Rotating the servomotor in increments of $20^\circ $}}{198}% -\contentsline {figure}{\numberline {10.4}{\ignorespaces Rotating the servomotor as suggested by the potentiometer}}{199}% +\contentsline {figure}{\numberline {10.1}{\ignorespaces Rotating the servomotor by a fixed angle}}{202}% +\contentsline {figure}{\numberline {10.2}{\ignorespaces Rotating the servomotor forward and then reverse}}{203}% +\contentsline {figure}{\numberline {10.3}{\ignorespaces Rotating the servomotor in increments of $20^\circ $}}{204}% +\contentsline {figure}{\numberline {10.4}{\ignorespaces Rotating the servomotor as suggested by the potentiometer}}{205}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{214}% -\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{214}% -\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{215}% -\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{219}% -\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{220}% -\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{221}% -\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{222}% -\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{223}% -\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{223}% -\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{224}% -\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{224}% -\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{225}% -\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{225}% -\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{226}% +\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{220}% +\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{220}% +\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{221}% +\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{225}% +\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{226}% +\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{227}% +\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{228}% +\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{229}% +\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{229}% +\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{230}% +\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{230}% +\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{231}% +\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{231}% +\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{232}% diff --git a/floss-arduino.log b/floss-arduino.log index 38efdbc..ce11181 100644 --- a/floss-arduino.log +++ b/floss-arduino.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 2 MAY 2021 07:44 +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 3 MAY 2021 06:48 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -523,7 +523,7 @@ Overfull \hbox (74.6947pt too wide) detected at line 9 {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] [4] [5] -Overfull \hbox (42.2769pt too wide) detected at line 207 +Overfull \hbox (42.2769pt too wide) detected at line 213 \T1/cmr/bx/n/10.95 References [] @@ -1746,11 +1746,6 @@ d.ino) [120] [121] (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-read.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-led.sce) -Overfull \hbox (0.34052pt too wide) in paragraph at lines 322--328 -\T1/cmr/m/n/10.95 Next, we shall per-form the above men-tioned ex-per-i-ment, t -o read LDR val-ues, through - [] - [122] </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos. PNG, id=612, 257.46187pt x 304.13625pt> @@ -1950,12 +1945,6 @@ C-bead.jpg Graphic file (type jpg) Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th ermistor/figures/NTC-bead.jpg used on input line 70. (pdftex.def) Requested size: 178.86702pt x 161.32933pt. - -LaTeX Warning: Citation `therm-wiki' on page 149 undefined on input line 70. - - -LaTeX Warning: Citation `therm-wiki' on page 149 undefined on input line 70. - </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-s ym.png, id=712, 1284.8pt x 913.4125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th @@ -2021,79 +2010,107 @@ ead/therm-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r ead/therm-read.ino) [152 </home/fossee/Desktop/floss-scilab-arduino/user-code/t hermistor/figures/thermistor-buzzer.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-b +uzzer/therm-buzzer.ino) [153] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r -ead/therm-read.ino [153]) +ead/therm-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-b -uzzer/therm-buzzer.ino) [154] [155] +uzzer/therm-buzzer.ino [154]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-re ad.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-re +ad.sce) [155] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-bu zzer.sce) [156] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-re +ad.sce [157]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-bu +zzer.sce) </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-r -ead-xcos.png, id=760, 617.30624pt x 548.0475pt> +ead-xcos.png, id=764, 617.30624pt x 548.0475pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-read-xcos.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the rm-read-xcos.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th -ermistor/figures/therm-read-xcos.png used on input line 306. +ermistor/figures/therm-read-xcos.png used on input line 391. (pdftex.def) Requested size: 194.76982pt x 172.91183pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-r -ead.png, id=761, 632.3625pt x 529.98pt> +ead.png, id=765, 632.3625pt x 529.98pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-read.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the rm-read.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th -ermistor/figures/therm-read.png used on input line 339. +ermistor/figures/therm-read.png used on input line 424. (pdftex.def) Requested size: 194.76982pt x 163.23271pt. + [158] [159 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/fig +ures/therm-read-xcos.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-b -uzzer-xcos.png, id=762, 627.34375pt x 530.98375pt> +uzzer-xcos.png, id=773, 627.34375pt x 530.98375pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-buzzer-xcos.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the rm-buzzer-xcos.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th -ermistor/figures/therm-buzzer-xcos.png used on input line 355. +ermistor/figures/therm-buzzer-xcos.png used on input line 443. (pdftex.def) Requested size: 258.36281pt x 218.68509pt. - [157 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/t -herm-read-xcos.png>] -Overfull \hbox (4.77844pt too wide) in paragraph at lines 373--393 + [160 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/t +herm-read.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/ +figures/therm-buzzer-xcos.png>] +Overfull \hbox (4.77844pt too wide) in paragraph at lines 465--485 [][] [] </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-b -uzzer.png, id=768, 612.2875pt x 589.20125pt> +uzzer.png, id=779, 612.2875pt x 589.20125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-buzzer.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the rm-buzzer.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th -ermistor/figures/therm-buzzer.png used on input line 399. -(pdftex.def) Requested size: 178.86702pt x 172.12265pt. -[158 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th -erm-read.png>] - -LaTeX Warning: Text page 159 contains only floats. - -[159 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th -erm-buzzer-xcos.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/therm -istor/figures/therm-buzzer.png>] [160] +ermistor/figures/therm-buzzer.png used on input line 489. +(pdftex.def) Requested size: 258.36281pt x 248.6226pt. +[161] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-re +ad.py) [162 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/fig +ures/therm-buzzer.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-re +ad.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-bu +zzer.py) [163] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-re -ad.py [161]) +ad.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-bu -zzer.py [162]) +zzer.py [164]) +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [165] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-rea +d.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-rea -d.jl [163]) +d.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buz -zer.jl) [164] +zer.jl [166]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-rea +d.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buz +zer.jl [167]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th +erm-read.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th +erm-read.mo) [168] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th -erm-read.mo) [165] +erm-buzzer.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th -erm-buzzer.mo)) (./user-code/dcmotor/dcmotor.tex [166] +erm-read.mo [169]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th +erm-buzzer.mo [170])) (./user-code/dcmotor/dcmotor.tex [171] [172 + +] Chapter 9. </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_bo -ard.png, id=800, 247.92625pt x 232.87pt> +ard.png, id=820, 247.92625pt x 232.87pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or_board.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto @@ -2101,11 +2118,9 @@ r_board.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/dcmotor_board.png used on input line 62. (pdftex.def) Requested size: 258.36281pt x 242.69075pt. -[167 - -] +[173] </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic. -png, id=804, 415.5525pt x 467.7475pt> +png, id=824, 415.5525pt x 467.7475pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem atic.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schema @@ -2114,7 +2129,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/schematic.png used on input line 102. (pdftex.def) Requested size: 178.86702pt x 201.33447pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_d -escription.jpg, id=805, 2469.97781pt x 1973.12157pt> +escription.jpg, id=825, 2469.97781pt x 1973.12157pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mo tor_description.jpg Graphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mot @@ -2122,41 +2137,41 @@ or_description.jpg> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/dc_motor_description.jpg used on input line 108. (pdftex.def) Requested size: 258.36281pt x 206.38603pt. - [168 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo + [174 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo tor_board.png>] Overfull \vbox (9.00647pt too high) has occurred while \output is active [] -[169 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem +[175 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem atic.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/ -dc_motor_description.jpg>] [170] +dc_motor_description.jpg>] [176] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl ock/dcmotor-clock.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-bo th/dcmotor-both.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-lo -op/dcmotor-loop.ino [171]) +op/dcmotor-loop.ino [177]) Underfull \hbox (badness 10000) in paragraph at lines 221--237 [] -[172] +[178] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo ck.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo -ck.sce) [173] +ck.sce) [179] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo ck.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo -ck.sce) [174] +ck.sce) [180] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo ck.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-bot h.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loo -p.sce [175]) +p.sce [181]) </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-cl -ock.png, id=836, 275.52937pt x 290.58563pt> +ock.png, id=855, 275.52937pt x 290.58563pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-clock.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto @@ -2164,10 +2179,10 @@ r-clock.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/dcmotor-clock.png used on input line 399. (pdftex.def) Requested size: 178.86702pt x 188.64784pt. - [176 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo + [182 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo tor-clock.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-bo -th.png, id=840, 292.09125pt x 322.95656pt> +th.png, id=859, 292.09125pt x 322.95656pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-both.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto @@ -2176,7 +2191,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/dcmotor-both.png used on input line 453. (pdftex.def) Requested size: 178.86702pt x 197.77196pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-lo -op.png, id=841, 281.55188pt x 307.90031pt> +op.png, id=860, 281.55188pt x 307.90031pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-loop.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto @@ -2184,32 +2199,32 @@ r-loop.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc motor/figures/dcmotor-loop.png used on input line 497. (pdftex.def) Requested size: 178.86702pt x 195.60847pt. - [177] [178 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figure -s/dcmotor-both.png>] [179 </home/fossee/Desktop/floss-scilab-arduino/user-code/ -dcmotor/figures/dcmotor-loop.png>] [180] + [183] [184 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figure +s/dcmotor-both.png>] [185 </home/fossee/Desktop/floss-scilab-arduino/user-code/ +dcmotor/figures/dcmotor-loop.png>] [186] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo -ck.py [181]) +ck.py [187]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-bot -h.py) [182] +h.py) [188] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loo -p.py) [183] +p.py) [189] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc -k.jl [184]) +k.jl [190]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both .jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop -.jl) [185] +.jl) [191] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot or-clock.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot -or-both.mo [186]) +or-both.mo [192]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot -or-loop.mo [187])) (./user-code/servo/servo.tex [188] +or-loop.mo [193])) (./user-code/servo/servo.tex [194] Chapter 10. Underfull \vbox (badness 1975) has occurred while \output is active [] - [189 + [195 ] Overfull \hbox (23.49748pt too wide) in paragraph at lines 90--98 @@ -2217,17 +2232,17 @@ Overfull \hbox (23.49748pt too wide) in paragraph at lines 90--98 by $\OT1/cmr/m/n/10.95 30[]$ \T1/cmr/m/n/10.95 us-ing Ar-duino Code 10.1[]. [] -[190] +[196] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-init/s -ervo-init.ino [191]) +ervo-init.ino [197]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-revers e/servo-reverse.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-loop/s -ervo-loop.ino) [192] +ervo-loop.ino) [198] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-pot/se rvo-pot.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sc -e) [193] +e) [199] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce ) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce @@ -2235,13 +2250,13 @@ e) [193] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sc e) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-reverse -.sce [194]) +.sce [200]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-loop.sc e) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce ) </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.p -ng, id=904, 265.74281pt x 309.40594pt> +ng, id=923, 265.74281pt x 309.40594pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-i nit.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-in @@ -2249,9 +2264,9 @@ it.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se rvo/figures/servo-init.png used on input line 299. (pdftex.def) Requested size: 178.86702pt x 208.2593pt. - [195] + [201] </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-revers -e.png, id=908, 244.66406pt x 281.55188pt> +e.png, id=927, 244.66406pt x 281.55188pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r everse.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-re @@ -2262,10 +2277,10 @@ rvo/figures/servo-reverse.png used on input line 334. Underfull \vbox (badness 3199) has occurred while \output is active [] - [196 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- + [202 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- init.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.p -ng, id=912, 281.55188pt x 347.04657pt> +ng, id=931, 281.55188pt x 347.04657pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l oop.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-lo @@ -2274,7 +2289,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se rvo/figures/servo-loop.png used on input line 372. (pdftex.def) Requested size: 178.86702pt x 220.47803pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.pn -g, id=913, 286.06876pt x 292.09125pt> +g, id=932, 286.06876pt x 292.09125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-p ot.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-po @@ -2283,38 +2298,38 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se rvo/figures/servo-pot.png used on input line 415. (pdftex.def) Requested size: 178.86702pt x 182.63234pt. -[197 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r +[203 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r everse.png>] Overfull \hbox (17.60953pt too wide) in paragraph at lines 435--446 [][] [] -[198 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l +[204 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l oop.png>] -LaTeX Warning: Reference `sec:py-start' on page 199 undefined on input line 459 +LaTeX Warning: Reference `sec:py-start' on page 205 undefined on input line 459 . Underfull \vbox (badness 10000) has occurred while \output is active [] - [199 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- + [205 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- pot.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py -) [200] +) [206] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py -[201]) +[207]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-reverse -.py [202]) +.py [208]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-loop.py -[203]) +[209]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py -[204]) +[210]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) -[205] +[211] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) @@ -2326,10 +2341,10 @@ vers-ing. Avail- (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-reverse. -jl) [206] +jl) [212] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-loop.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) -[207] +[213] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-i nit.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p @@ -2337,19 +2352,19 @@ ot.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p ot.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-i -nit.mo [208]) +nit.mo [214]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-r -everse.mo [209]) +everse.mo [215]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-l oop.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p -ot.mo [210])) (./user-code/modbus/modbus.tex [211] [212 +ot.mo [216])) (./user-code/modbus/modbus.tex [217] [218 ] Chapter 11. -[213] +[219] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png, i -d=968, 672.5125pt x 224.84pt> +d=987, 672.5125pt x 224.84pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.p ng Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.pn @@ -2358,7 +2373,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/fig1.png used on input line 71. (pdftex.def) Requested size: 357.73405pt x 119.60033pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png, i -d=969, 360.34625pt x 375.4025pt> +d=988, 360.34625pt x 375.4025pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.p ng Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.pn @@ -2367,7 +2382,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/fig2.png used on input line 79. (pdftex.def) Requested size: 178.86702pt x 186.33748pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png, i -d=970, 481.04718pt x 214.55156pt> +d=989, 481.04718pt x 214.55156pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.p ng Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.pn @@ -2375,12 +2390,12 @@ g> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/fig3.png used on input line 106. (pdftex.def) Requested size: 357.73405pt x 159.55464pt. - [214 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1. + [220 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1. png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/fig -ures/fig2.png (PNG copy)>] [215 </home/fossee/Desktop/floss-scilab-arduino/user --code/modbus/figures/fig3.png (PNG copy)>] [216] [217] +ures/fig2.png (PNG copy)>] [221 </home/fossee/Desktop/floss-scilab-arduino/user +-code/modbus/figures/fig3.png (PNG copy)>] [222] [223] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up -.png, id=985, 722.7pt x 542.025pt> +.png, id=1005, 722.7pt x 542.025pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-S et-Up.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Se @@ -2388,9 +2403,9 @@ t-Up.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/Full-Set-Up.png used on input line 300. (pdftex.def) Requested size: 258.36281pt x 193.77246pt. - [218] + [224] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagr -am.PNG, id=989, 398.23781pt x 255.95625pt> +am.PNG, id=1009, 398.23781pt x 255.95625pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- diagram.PNG Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-d @@ -2399,7 +2414,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/block-diagram.PNG used on input line 329. (pdftex.def) Requested size: 258.36281pt x 166.06104pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_cod -e_flowchart.png, id=990, 327.2225pt x 480.79625pt> +e_flowchart.png, id=1010, 327.2225pt x 480.79625pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduin o_code_flowchart.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino @@ -2407,10 +2422,10 @@ _code_flowchart.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/arduino_code_flowchart.png used on input line 348. (pdftex.def) Requested size: 258.36281pt x 379.61945pt. - [219 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full- + [225 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full- Set-Up.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.p -ng, id=995, 482.55281pt x 362.10281pt> +ng, id=1015, 482.55281pt x 362.10281pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch art.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowcha @@ -2419,7 +2434,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/flowchart.png used on input line 376. (pdftex.def) Requested size: 357.73405pt x 268.44914pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out -put.png, id=996, 1028.34187pt x 578.16pt> +put.png, id=1016, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren t-output.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current @@ -2428,7 +2443,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/current-output.png used on input line 393. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out -put-setup.jpg, id=997, 2509.375pt x 1411.2725pt> +put-setup.jpg, id=1017, 2509.375pt x 1411.2725pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren t-output-setup.jpg Graphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current @@ -2437,7 +2452,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/current-output-setup.jpg used on input line 400. (pdftex.def) Requested size: 258.36281pt x 145.29163pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out -put.png, id=998, 1028.34187pt x 578.16pt> +put.png, id=1018, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag e-output.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage @@ -2446,7 +2461,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/voltage-output.png used on input line 412. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out -put-setup.jpg, id=999, 2509.375pt x 1411.2725pt> +put-setup.jpg, id=1019, 2509.375pt x 1411.2725pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag e-output-setup.jpg Graphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage @@ -2455,7 +2470,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/voltage-output-setup.jpg used on input line 419. (pdftex.def) Requested size: 258.36281pt x 145.29163pt. </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe -r-output.png, id=1000, 1028.34187pt x 578.16pt> +r-output.png, id=1020, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active -power-output.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active- @@ -2464,10 +2479,10 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo dbus/figures/active-power-output.png used on input line 429. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. -[220 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- +[226 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- diagram.PNG>] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe -r-output-setup.jpg, id=1006, 2509.375pt x 1411.2725pt> +r-output-setup.jpg, id=1025, 2509.375pt x 1411.2725pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active -power-output-setup.jpg Graphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active- @@ -2478,10 +2493,10 @@ dbus/figures/active-power-output-setup.jpg used on input line 436. Underfull \vbox (badness 10000) has occurred while \output is active [] - [221 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/ardui + [227 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/ardui no_code_flowchart.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_ -xcos.png, id=1011, 635.37375pt x 455.7025pt> +xcos.png, id=1030, 635.37375pt x 455.7025pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_v alue_xcos.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_va @@ -2500,46 +2515,46 @@ Overfull \hbox (16.70493pt too wide) in paragraph at lines 479--491 [][] [] -[222 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch -art.png (PNG copy)>] [223 </home/fossee/Desktop/floss-scilab-arduino/user-code/ +[228 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch +art.png (PNG copy)>] [229 </home/fossee/Desktop/floss-scilab-arduino/user-code/ modbus/figures/current-output.png (PNG copy)> </home/fossee/Desktop/floss-scila b-arduino/user-code/modbus/figures/current-output-setup.jpg>] Underfull \vbox (badness 10000) has occurred while \output is active [] - [224 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/volta + [230 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/volta ge-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/ modbus/figures/voltage-output-setup.jpg>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send_packet -.ino [225 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/a +.ino [231 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/a ctive-power-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/u -ser-code/modbus/figures/active-power-output-setup.jpg>] [226 </home/fossee/Desk +ser-code/modbus/figures/active-power-output-setup.jpg>] [232 </home/fossee/Desk top/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png>]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_val.sce ) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_current .sci) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_voltage -.sci [227]) +.sci [233]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_active_ power.sci) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_current .py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_voltage -.py [228]) +.py [234]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_active_ power.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.j l) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.j -l [229]) +l [235]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCu rrent.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVo -ltage.mo [230]) +ltage.mo [236]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPo -wer.mo)) (./floss-arduino.bbl [231] [232 +wer.mo)) (./floss-arduino.bbl [237] [238 ] Underfull \hbox (badness 10000) in paragraph at lines 4--9 @@ -2570,7 +2585,7 @@ Overfull \hbox (15.39987pt too wide) in paragraph at lines 49--53 /Skittles_M%26M%27s [] -[233] +[239] Underfull \hbox (badness 1577) in paragraph at lines 95--98 []\T1/cmr/m/n/10.95 Juliaio/serialports.jl: Se-ri-al-port io streams in ju-lia backed by py-se-rial. @@ -2580,7 +2595,7 @@ backed by py-se-rial. \tf@thm=\write13 \openout13 = `floss-arduino.thm'. - [234] (./floss-arduino.aux) + [240] (./floss-arduino.aux) LaTeX Warning: There were undefined references. @@ -2589,13 +2604,13 @@ LaTeX Warning: There were multiply-defined labels. ) Here is how much of TeX's memory you used: - 9841 strings out of 481239 - 217866 string characters out of 5920377 + 9859 strings out of 481239 + 220042 string characters out of 5920377 742688 words of memory out of 5000000 - 24312 multiletter control sequences out of 15000+600000 + 24304 multiletter control sequences out of 15000+600000 554670 words of font info for 69 fonts, out of 8000000 for 9000 1143 hyphenation exceptions out of 8191 - 50i,11n,53p,376b,1777s stack positions out of 5000i,500n,10000p,200000b,80000s + 50i,11n,53p,363b,1777s stack positions out of 5000i,500n,10000p,200000b,80000s {/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}{/usr/share/texmf /fonts/enc/dvips/cm-super/cm-super-t1.enc}{/usr/share/texlive/texmf-dist/fonts/ enc/dvips/base/8r.enc}</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont @@ -2619,10 +2634,10 @@ sr/share/texmf/fonts/type1/public/cm-super/sfrm1000.pfb></usr/share/texmf/fonts /type1/public/cm-super/sfrm1095.pfb></usr/share/texmf/fonts/type1/public/cm-sup er/sfsi1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfss1095.pfb></us r/share/texmf/fonts/type1/public/cm-super/sfti1095.pfb> -Output written on floss-arduino.pdf (258 pages, 21046946 bytes). +Output written on floss-arduino.pdf (264 pages, 21056458 bytes). PDF statistics: - 1149 PDF objects out of 1200 (max. 8388607) - 668 compressed objects within 7 object streams + 1168 PDF objects out of 1200 (max. 8388607) + 681 compressed objects within 7 object streams 0 named destinations out of 1000 (max. 500000) 581 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/floss-arduino.lot b/floss-arduino.lot index 0176cf4..3774567 100644 --- a/floss-arduino.lot +++ b/floss-arduino.lot @@ -18,23 +18,23 @@ \addvspace {10\p@ } \contentsline {table}{\numberline {7.1}{\ignorespaces Xcos parameters to turn on different LEDs depending on the potentiometer value\relax }}{142}% \addvspace {10\p@ } -\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{158}% -\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{160}% -\addvspace {10\p@ } -\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{173}% -\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{173}% -\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{177}% -\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{178}% -\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{180}% -\addvspace {10\p@ } -\contentsline {table}{\numberline {10.1}{\ignorespaces Connecting a typical servomotor to Arduino Uno\ board\relax }}{190}% -\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters to rotate the servomotor by $30^\circ $\relax }}{196}% -\contentsline {table}{\numberline {10.3}{\ignorespaces Parameters to rotate the servomotor forward and reverse\relax }}{198}% -\contentsline {table}{\numberline {10.4}{\ignorespaces Parameters to make the servomotor to sweep the entire range in increments\relax }}{199}% -\contentsline {table}{\numberline {10.5}{\ignorespaces Parameters to rotate the servomotor based on the input from the potentiometer\relax }}{200}% -\addvspace {10\p@ } -\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{216}% -\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{216}% -\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{217}% -\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{217}% -\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{226}% +\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{159}% +\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{161}% +\addvspace {10\p@ } +\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{179}% +\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{179}% +\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{183}% +\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{184}% +\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{186}% +\addvspace {10\p@ } +\contentsline {table}{\numberline {10.1}{\ignorespaces Connecting a typical servomotor to Arduino Uno\ board\relax }}{196}% +\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters to rotate the servomotor by $30^\circ $\relax }}{202}% +\contentsline {table}{\numberline {10.3}{\ignorespaces Parameters to rotate the servomotor forward and reverse\relax }}{204}% +\contentsline {table}{\numberline {10.4}{\ignorespaces Parameters to make the servomotor to sweep the entire range in increments\relax }}{205}% +\contentsline {table}{\numberline {10.5}{\ignorespaces Parameters to rotate the servomotor based on the input from the potentiometer\relax }}{206}% +\addvspace {10\p@ } +\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{222}% +\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{222}% +\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{223}% +\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{223}% +\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{232}% diff --git a/floss-arduino.pdf b/floss-arduino.pdf Binary files differindex ef6ce59..240beaf 100644 --- a/floss-arduino.pdf +++ b/floss-arduino.pdf diff --git a/floss-arduino.pyd b/floss-arduino.pyd index da185a1..e1f9a1f 100644 --- a/floss-arduino.pyd +++ b/floss-arduino.pyd @@ -14,18 +14,18 @@ \addvspace {10pt} \contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{143}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{161}% -\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{162}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{164}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{164}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{181}% -\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{182}% -\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{182}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{187}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{188}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{188}% \addvspace {10pt} -\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{201}% -\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{202}% -\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{203}% -\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{204}% +\contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{207}% +\contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{208}% +\contentsline {section}{\numberline {10.{3}}Rotating the servomotor in steps of $20^\circ $}{209}% +\contentsline {section}{\numberline {10.{4}}Rotating the servomotor to a degree specified by the potentiometer}{210}% \addvspace {10pt} -\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{228}% -\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{228}% -\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{229}% +\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{234}% +\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{234}% +\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{235}% diff --git a/floss-arduino.thm b/floss-arduino.thm index 30b3823..fa46965 100644 --- a/floss-arduino.thm +++ b/floss-arduino.thm @@ -58,68 +58,68 @@ \contentsline {pymass}{{Python Code}{7.{1}}{}}{143}% \contentsline {juliamass}{{Julia Code}{7.{1}}{}}{145}% \contentsline {OpenModelicamass}{{OpenModelica Code}{7.{1}}{}}{147}% -\contentsline {egmass}{{Exercise}{8.{1}}{}}{153}% -\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{153}% +\contentsline {egmass}{{Exercise}{8.{1}}{}}{154}% +\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{154}% \contentsline {ardmass}{{Arduino Code}{8.{2}}{}}{154}% -\contentsline {egmass}{{Exercise}{8.{2}}{}}{155}% -\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{156}% -\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{156}% -\contentsline {pymass}{{Python Code}{8.{1}}{}}{161}% -\contentsline {pymass}{{Python Code}{8.{2}}{}}{162}% -\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{163}% -\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{164}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{165}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{166}% -\contentsline {egmass}{{Exercise}{9.{1}}{}}{170}% -\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{171}% -\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{171}% -\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{171}% -\contentsline {egmass}{{Exercise}{9.{2}}{}}{174}% -\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{175}% -\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{175}% -\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{175}% -\contentsline {egmass}{{Exercise}{9.{3}}{}}{177}% -\contentsline {pymass}{{Python Code}{9.{1}}{}}{181}% -\contentsline {pymass}{{Python Code}{9.{2}}{}}{182}% -\contentsline {pymass}{{Python Code}{9.{3}}{}}{182}% -\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{184}% -\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{185}% -\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{185}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{186}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{186}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{187}% -\contentsline {egmass}{{Exercise}{10.{1}}{}}{191}% -\contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{191}% -\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{192}% -\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{192}% -\contentsline {ardmass}{{Arduino Code}{10.{4}}{}}{193}% -\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{194}% -\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{194}% -\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{195}% -\contentsline {codemass}{{Scilab Code}{10.{4}}{}}{195}% -\contentsline {pymass}{{Python Code}{10.{1}}{}}{201}% -\contentsline {pymass}{{Python Code}{10.{2}}{}}{202}% -\contentsline {pymass}{{Python Code}{10.{3}}{}}{203}% -\contentsline {pymass}{{Python Code}{10.{4}}{}}{204}% -\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{206}% -\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{206}% -\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{207}% -\contentsline {juliamass}{{Julia Code}{10.{4}}{}}{207}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{208}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{209}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{210}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{4}}{}}{210}% -\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{225}% -\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{227}% -\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{227}% -\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{227}% -\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{228}% -\contentsline {pymass}{{Python Code}{11.{1}}{}}{228}% -\contentsline {pymass}{{Python Code}{11.{2}}{}}{228}% -\contentsline {pymass}{{Python Code}{11.{3}}{}}{229}% -\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{229}% -\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{229}% -\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{230}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{230}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{230}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{231}% +\contentsline {egmass}{{Exercise}{8.{2}}{}}{157}% +\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{157}% +\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{158}% +\contentsline {pymass}{{Python Code}{8.{1}}{}}{164}% +\contentsline {pymass}{{Python Code}{8.{2}}{}}{164}% +\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{167}% +\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{167}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{169}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{170}% +\contentsline {egmass}{{Exercise}{9.{1}}{}}{176}% +\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{177}% +\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{177}% +\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{177}% +\contentsline {egmass}{{Exercise}{9.{2}}{}}{180}% +\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{181}% +\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{181}% +\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{181}% +\contentsline {egmass}{{Exercise}{9.{3}}{}}{183}% +\contentsline {pymass}{{Python Code}{9.{1}}{}}{187}% +\contentsline {pymass}{{Python Code}{9.{2}}{}}{188}% +\contentsline {pymass}{{Python Code}{9.{3}}{}}{188}% +\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{190}% +\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{191}% +\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{191}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{192}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{192}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{193}% +\contentsline {egmass}{{Exercise}{10.{1}}{}}{197}% +\contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{197}% +\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{198}% +\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{198}% +\contentsline {ardmass}{{Arduino Code}{10.{4}}{}}{199}% +\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{200}% +\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{200}% +\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{201}% +\contentsline {codemass}{{Scilab Code}{10.{4}}{}}{201}% +\contentsline {pymass}{{Python Code}{10.{1}}{}}{207}% +\contentsline {pymass}{{Python Code}{10.{2}}{}}{208}% +\contentsline {pymass}{{Python Code}{10.{3}}{}}{209}% +\contentsline {pymass}{{Python Code}{10.{4}}{}}{210}% +\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{212}% +\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{212}% +\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{213}% +\contentsline {juliamass}{{Julia Code}{10.{4}}{}}{213}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{214}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{215}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{216}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{4}}{}}{216}% +\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{231}% +\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{233}% +\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{233}% +\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{233}% +\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{234}% +\contentsline {pymass}{{Python Code}{11.{1}}{}}{234}% +\contentsline {pymass}{{Python Code}{11.{2}}{}}{234}% +\contentsline {pymass}{{Python Code}{11.{3}}{}}{235}% +\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{235}% +\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{235}% +\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{236}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{236}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{236}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{237}% diff --git a/floss-arduino.toc b/floss-arduino.toc index ce31b3f..13fbf0c 100644 --- a/floss-arduino.toc +++ b/floss-arduino.toc @@ -139,69 +139,75 @@ \contentsline {section}{\numberline {8.2}Connecting a thermistor with Arduino Uno\ using a breadboard}{150}% \contentsline {section}{\numberline {8.3}Interfacing the Thermistor from the Arduino IDE}{152}% \contentsline {subsection}{\numberline {8.3.1}Interfacing the Thermistor}{152}% -\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{153}% -\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{154}% -\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{154}% -\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{156}% -\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{157}% -\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{160}% -\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{160}% -\contentsline {subsection}{\numberline {8.6.2}Python Code}{161}% -\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{163}% -\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{163}% -\contentsline {subsection}{\numberline {8.7.2}Julia Code}{163}% -\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{164}% -\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{164}% -\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{165}% -\contentsline {chapter}{\numberline {9}Controlling a DC motor}{167}% -\contentsline {section}{\numberline {9.1}Preliminaries}{167}% -\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{169}% -\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{169}% -\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{171}% -\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{172}% -\contentsline {subsection}{\numberline {9.3.1}Initialization}{172}% -\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{173}% -\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{174}% -\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{175}% -\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{176}% -\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{179}% -\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{179}% -\contentsline {subsection}{\numberline {9.5.2}Python Code}{181}% -\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{184}% -\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{184}% -\contentsline {subsection}{\numberline {9.6.2}Julia Code}{184}% -\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{185}% -\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{185}% -\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{186}% -\contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{189}% -\contentsline {section}{\numberline {10.1}Preliminaries}{189}% -\contentsline {section}{\numberline {10.2}Controlling the Servometer through the Arduino IDE}{190}% -\contentsline {subsection}{\numberline {10.2.1}Controlling the Servometer}{190}% -\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{191}% -\contentsline {section}{\numberline {10.3}Controlling the Servomotor through Scilab}{193}% -\contentsline {subsection}{\numberline {10.3.1}Controlling the Servomotor}{193}% -\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{194}% -\contentsline {section}{\numberline {10.4}Controling the Servomotor through Xcos}{195}% -\contentsline {section}{\numberline {10.5}Controlling the Servomotor through Python}{200}% -\contentsline {subsection}{\numberline {10.5.1}Controlling the Servomotor}{200}% -\contentsline {subsection}{\numberline {10.5.2}Python Code}{201}% -\contentsline {section}{\numberline {10.6}Controlling the Servomotor through Julia}{205}% -\contentsline {subsection}{\numberline {10.6.1}Controlling the Servomotor}{205}% -\contentsline {subsection}{\numberline {10.6.2}Julia Code}{206}% -\contentsline {section}{\numberline {10.7}Controlling the Servomotor through OpenModelica}{207}% -\contentsline {subsection}{\numberline {10.7.1}Controlling the Servomotor}{207}% -\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{208}% -\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{213}% -\contentsline {section}{\numberline {11.1}Preliminaries}{213}% -\contentsline {section}{\numberline {11.2}Objective}{218}% -\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{218}% -\contentsline {section}{\numberline {11.4}Software}{219}% -\contentsline {section}{\numberline {11.5}Output}{220}% -\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{222}% -\contentsline {section}{\numberline {11.7}Code}{225}% -\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{225}% -\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{227}% -\contentsline {subsection}{\numberline {11.7.3}Python Code}{228}% -\contentsline {subsection}{\numberline {11.7.4}Julia Code}{229}% -\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{230}% -\contentsline {chapter}{\numberline {References}}{233}% +\contentsline {paragraph}{Note:}{154}% +\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{154}% +\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{155}% +\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{155}% +\contentsline {paragraph}{Note:}{156}% +\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{157}% +\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{158}% +\contentsline {paragraph}{Note:}{161}% +\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{162}% +\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{162}% +\contentsline {paragraph}{Note:}{163}% +\contentsline {subsection}{\numberline {8.6.2}Python Code}{164}% +\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{166}% +\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{166}% +\contentsline {paragraph}{Note:}{167}% +\contentsline {subsection}{\numberline {8.7.2}Julia Code}{167}% +\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{168}% +\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{168}% +\contentsline {paragraph}{Note:}{169}% +\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{169}% +\contentsline {chapter}{\numberline {9}Controlling a DC motor}{173}% +\contentsline {section}{\numberline {9.1}Preliminaries}{173}% +\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{175}% +\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{175}% +\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{177}% +\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{178}% +\contentsline {subsection}{\numberline {9.3.1}Initialization}{178}% +\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{179}% +\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{180}% +\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{181}% +\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{182}% +\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{185}% +\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{185}% +\contentsline {subsection}{\numberline {9.5.2}Python Code}{187}% +\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{190}% +\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{190}% +\contentsline {subsection}{\numberline {9.6.2}Julia Code}{190}% +\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{191}% +\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{191}% +\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{192}% +\contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{195}% +\contentsline {section}{\numberline {10.1}Preliminaries}{195}% +\contentsline {section}{\numberline {10.2}Controlling the Servometer through the Arduino IDE}{196}% +\contentsline {subsection}{\numberline {10.2.1}Controlling the Servometer}{196}% +\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{197}% +\contentsline {section}{\numberline {10.3}Controlling the Servomotor through Scilab}{199}% +\contentsline {subsection}{\numberline {10.3.1}Controlling the Servomotor}{199}% +\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{200}% +\contentsline {section}{\numberline {10.4}Controling the Servomotor through Xcos}{201}% +\contentsline {section}{\numberline {10.5}Controlling the Servomotor through Python}{206}% +\contentsline {subsection}{\numberline {10.5.1}Controlling the Servomotor}{206}% +\contentsline {subsection}{\numberline {10.5.2}Python Code}{207}% +\contentsline {section}{\numberline {10.6}Controlling the Servomotor through Julia}{211}% +\contentsline {subsection}{\numberline {10.6.1}Controlling the Servomotor}{211}% +\contentsline {subsection}{\numberline {10.6.2}Julia Code}{212}% +\contentsline {section}{\numberline {10.7}Controlling the Servomotor through OpenModelica}{213}% +\contentsline {subsection}{\numberline {10.7.1}Controlling the Servomotor}{213}% +\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{214}% +\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{219}% +\contentsline {section}{\numberline {11.1}Preliminaries}{219}% +\contentsline {section}{\numberline {11.2}Objective}{224}% +\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{224}% +\contentsline {section}{\numberline {11.4}Software}{225}% +\contentsline {section}{\numberline {11.5}Output}{226}% +\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{228}% +\contentsline {section}{\numberline {11.7}Code}{231}% +\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{231}% +\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{233}% +\contentsline {subsection}{\numberline {11.7.3}Python Code}{234}% +\contentsline {subsection}{\numberline {11.7.4}Julia Code}{235}% +\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{236}% +\contentsline {chapter}{\numberline {References}}{239}% diff --git a/indent.log b/indent.log new file mode 100644 index 0000000..585db88 --- /dev/null +++ b/indent.log @@ -0,0 +1,25 @@ +INFO: latexindent version 3.7.1, 2019-09-07, a script to indent .tex files + latexindent lives here: /usr/share/texlive/texmf-dist/scripts/latexindent/ + Mon May 3 06:36:47 2021 + Filename: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/__latexindent_temp.tex +INFO: Processing switches: + -y|--yaml: YAML settings specified via command line + -c|--cruft: cruft directory +INFO: Directory for backup files and /home/fossee/Desktop/floss-scilab-arduino/indent.log: /home/fossee/Desktop/floss-scilab-arduino/ +INFO: YAML settings read: defaultSettings.yaml + Reading defaultSettings.yaml from /usr/share/texlive/texmf-dist/scripts/latexindent/defaultSettings.yaml +INFO: YAML settings read: indentconfig.yaml or .indentconfig.yaml + Home directory is /home/fossee (didn't find either indentconfig.yaml or .indentconfig.yaml) + To specify user settings you would put indentconfig.yaml here: /home/fossee/indentconfig.yaml + Alternatively, you can use the hidden file .indentconfig.yaml as: /home/fossee/.indentconfig.yaml +INFO: YAML settings read: -y switch + Updating masterSettings with defaultIndent: +INFO: Phase 1: searching for objects +INFO: Phase 2: finding surrounding indentation +INFO: Phase 3: indenting objects +INFO: Phase 4: final indentation check +INFO: Output routine: + Not outputting to file; see -w and -o switches for more options. + -------------- +INFO: Please direct all communication/issues to: + https://github.com/cmhughes/latexindent.pl diff --git a/user-code/ldr/ldr.tex b/user-code/ldr/ldr.tex index 4e9e320..9bb0208 100644 --- a/user-code/ldr/ldr.tex +++ b/user-code/ldr/ldr.tex @@ -5,29 +5,29 @@ \newcommand{\LocLDRfig}{\Origin/user-code/ldr/figures}
\newcommand{\LocLDRscicode}{\Origin/user-code/ldr/scilab}
\newcommand{\LocLDRscibrief}[1]{{\tt
- \seqsplit{Origin/user-code/ldr/scilab/#1}},
-see \fnrefp{fn:file-loc}}
+ \seqsplit{Origin/user-code/ldr/scilab/#1}},
+ see \fnrefp{fn:file-loc}}
\newcommand{\LocLDRardcode}{\Origin/user-code/ldr/arduino}
\newcommand{\LocLDRardbrief}[1]{{\tt
- \seqsplit{Origin/user-code/ldr/arduino/#1}},
-see \fnrefp{fn:file-loc}}
+ \seqsplit{Origin/user-code/ldr/arduino/#1}},
+ see \fnrefp{fn:file-loc}}
%%%%%%%%%python
\newcommand{\LocLDRpycode}{\Origin/user-code/ldr/python}
\newcommand{\LocLDRpybrief}[1]{{\tt \seqsplit{%
- Origin/user-code/ldr/python/#1}}, see \fnrefp{fn:file-loc}}
+ Origin/user-code/ldr/python/#1}}, see \fnrefp{fn:file-loc}}
%%%%%%python
%%%%%%%%%julia starts
\newcommand{\LocLDRjuliacode}{\Origin/user-code/ldr/julia}
\newcommand{\LocLDRjuliabrief}[1]{{\tt \seqsplit{%
- Origin/user-code/ldr/julia/#1}}, see \fnrefp{fn:file-loc}}
+ Origin/user-code/ldr/julia/#1}}, see \fnrefp{fn:file-loc}}
%%%%%%julia ends
%%%%%%OpenModelica Starts
\newcommand{\LocLDROpenModelicacode}{\Origin/user-code/ldr/OpenModelica} %added for OpenModelica
\newcommand{\LocLDROpenModelicabrief}[1]{{\tt \seqsplit{%
- Origin/user-code/led/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
+ Origin/user-code/led/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
%%%%%OpenModelcia Ends
@@ -56,21 +56,21 @@ experiment are shown in \figref{fig:ldrconn}. However, the user doesn't need to connect any wire or component explicitly.
\begin{figure}
-\centering
-\subfloat[Pictorial representation of an LDR]{
-\includegraphics[width=\smfig]{\LocLDRfig/ldr.jpg}
-\label{fig:ldr}} \hfill
-\subfloat[Symbolic representation of an LDR]{
-\includegraphics[width=\smfig]{\LocLDRfig/ldr_sym.png}
-\label{fig:ldrsym}}
-\caption{Light Dependent Resistor}
+ \centering
+ \subfloat[Pictorial representation of an LDR]{
+ \includegraphics[width=\smfig]{\LocLDRfig/ldr.jpg}
+ \label{fig:ldr}} \hfill
+ \subfloat[Symbolic representation of an LDR]{
+ \includegraphics[width=\smfig]{\LocLDRfig/ldr_sym.png}
+ \label{fig:ldrsym}}
+ \caption{Light Dependent Resistor}
\end{figure}
\begin{figure}
-\centering
-\includegraphics[width=\smfig]{\LocLDRfig/ldr-conn.png}
-\caption{Internal connection diagram for the LDR on the shield}
-\label{fig:ldrconn}
+ \centering
+ \includegraphics[width=\smfig]{\LocLDRfig/ldr-conn.png}
+ \caption{Internal connection diagram for the LDR on the shield}
+ \label{fig:ldrconn}
\end{figure}
The LDR mounted on the shield is an analog sensor. Hence, the analog voltage, corresponding to the changing resistance, across its terminals needs to be digitized before being sent to the computer. This is taken care of by an onboard Analog to Digital Converter (ADC) of ATmega328 microcontroller on the \arduino\
@@ -92,10 +92,10 @@ A breadboard is a device for holding the components of a circuit and connecting them together. We can build an electronic circuit on a breadboard without doing any
soldering. To know more about the breadboard and other electronic components,
one should watch the Spoken Tutorials on Arduino as published on
-{\tt https://spoken-tutorial.org/}. Ideally, one should go through all the
+ {\tt https://spoken-tutorial.org/}. Ideally, one should go through all the
tutorials labeled as Basic. However, we strongly recommend the readers should
watch the fifth and sixth tutorials, i.e., {\tt First Arduino Program} and
-{\tt Arduino with Tricolor LED and Push button}.
+ {\tt Arduino with Tricolor LED and Push button}.
\begin{figure}
\centering
@@ -139,55 +139,55 @@ with a USB cable, as shown in \figref{arduino}. The reader should go through the instructions given in \secref{sec:ard-start} before getting started.
\begin{enumerate}
-\item A simple code to read the LDR values is given in
- \ardref{ard:ldr-read}. As discussed earlier, the 0-5V LDR readings
- are mapped to 0-1023 through an ADC. The
-%\redcolor{Arduino IDE}\
- Arduino IDE
- based command for the analog read functionality is given by,
- \lstinputlisting[firstline=6,lastline=6]
- {\LocLDRardcode/ldr-read/ldr-read.ino} where {\tt A5} represents the
- analog pin 5 to be read and the read LDR values are stored in the
- variable {\tt val}. The read values are then displayed using,
- \lstinputlisting[firstline=7,lastline=7]
- {\LocLDRardcode/ldr-read/ldr-read.ino} The delay in the code
- \lstinputlisting[firstline=8,lastline=8]
- {\LocLDRardcode/ldr-read/ldr-read.ino} is added so that the readings
- do not scroll away very fast. The entire reading and display
- operation is carried out 20 times.
-
- To observe the values, one has to open the {\tt Serial Monitor} of
- the Arduino IDE. The numbers displayed are in the range 0 to 1023
- and depend on the light falling on the LDR. If one does the
- experiment in a completely dark room, the reading will be 0. If on
- the other hand, a bright light, say for instance the torch light
- from mobile, is shined, the value displayed is close to 1023. One
- will get intermediate values by keeping one's finger on the LDR.
- While running this experiment, the readers must keep their fingertips on the LDR and
- observe the change in values being printed on the
- {\tt Serial Monitor} of Arduino IDE.
-
-\item This experiment is an extension of the previous
-experiment. Here, depending the resistance of the LDR, we will
- turn the red LED on. The program for this is available at
- \ardref{ard:ldr-led}. The value of LDR is read and stored in {\tt
- val}. In case it is below some threshold (like 300 in \ardref{ard:ldr-led}),
- it puts a high in pin number 11. From \secref{sec:led-pril},
- one can note that this pin is for the red LED. If the LDR value is below 300,
- the red LED will be on, else, it will be turned off.
- This loop is repeated 2,000 times. While running this experiment, the readers
- must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
- they can observe whether the red LED is turned on.
+ \item A simple code to read the LDR values is given in
+ \ardref{ard:ldr-read}. As discussed earlier, the 0-5V LDR readings
+ are mapped to 0-1023 through an ADC. The
+ %\redcolor{Arduino IDE}\
+ Arduino IDE
+ based command for the analog read functionality is given by,
+ \lstinputlisting[firstline=6,lastline=6]
+ {\LocLDRardcode/ldr-read/ldr-read.ino} where {\tt A5} represents the
+ analog pin 5 to be read and the read LDR values are stored in the
+ variable {\tt val}. The read values are then displayed using,
+ \lstinputlisting[firstline=7,lastline=7]
+ {\LocLDRardcode/ldr-read/ldr-read.ino} The delay in the code
+ \lstinputlisting[firstline=8,lastline=8]
+ {\LocLDRardcode/ldr-read/ldr-read.ino} is added so that the readings
+ do not scroll away very fast. The entire reading and display
+ operation is carried out 20 times.
+
+ To observe the values, one has to open the {\tt Serial Monitor} of
+ the Arduino IDE. The numbers displayed are in the range 0 to 1023
+ and depend on the light falling on the LDR. If one does the
+ experiment in a completely dark room, the reading will be 0. If on
+ the other hand, a bright light, say for instance the torch light
+ from mobile, is shined, the value displayed is close to 1023. One
+ will get intermediate values by keeping one's finger on the LDR.
+ While running this experiment, the readers must keep their fingertips on the LDR and
+ observe the change in values being printed on the
+ {\tt Serial Monitor} of Arduino IDE.
+
+ \item This experiment is an extension of the previous
+ experiment. Here, depending the resistance of the LDR, we will
+ turn the red LED on. The program for this is available at
+ \ardref{ard:ldr-led}. The value of LDR is read and stored in {\tt
+ val}. In case it is below some threshold (like 300 in \ardref{ard:ldr-led}),
+ it puts a high in pin number 11. From \secref{sec:led-pril},
+ one can note that this pin is for the red LED. If the LDR value is below 300,
+ the red LED will be on, else, it will be turned off.
+ This loop is repeated 2,000 times. While running this experiment, the readers
+ must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
+ they can observe whether the red LED is turned on.
\end{enumerate}
\begin{exercise}
-Carry out the following exercise:
-\begin{enumerate}
-\item Carry out the experiment in a dark room and check what values
- get displayed on the {\tt Serial Monitor}.
-\item Carry out the experiment with the torch light from the mobile
- phone shining on the LDR.
-\end{enumerate}
+ Carry out the following exercise:
+ \begin{enumerate}
+ \item Carry out the experiment in a dark room and check what values
+ get displayed on the {\tt Serial Monitor}.
+ \item Carry out the experiment with the torch light from the mobile
+ phone shining on the LDR.
+ \end{enumerate}
\end{exercise}
\subsection{Arduino Code}
@@ -195,19 +195,19 @@ Carry out the following exercise: \addtocontents{ard}{\protect\addvspace{\codclr}}
\begin{ardcode}
-\acaption{Read and display the LDR values}
-{Read and display the LDR values. Available at
- \LocLDRardbrief{ldr-read/ldr-read.ino}.}
-\label{ard:ldr-read}
-\lstinputlisting{\LocLDRardcode/ldr-read/ldr-read.ino}
+ \acaption{Read and display the LDR values}
+ {Read and display the LDR values. Available at
+ \LocLDRardbrief{ldr-read/ldr-read.ino}.}
+ \label{ard:ldr-read}
+ \lstinputlisting{\LocLDRardcode/ldr-read/ldr-read.ino}
\end{ardcode}
\begin{ardcode}
-\acaption{Turning the red LED on and off}
-{Turning the red LED on and off. Available at
- \LocLDRardbrief{ldr-led/ldr-led.ino}.}
-\label{ard:ldr-led}
-\lstinputlisting{\LocLDRardcode/ldr-led/ldr-led.ino}
+ \acaption{Turning the red LED on and off}
+ {Turning the red LED on and off. Available at
+ \LocLDRardbrief{ldr-led/ldr-led.ino}.}
+ \label{ard:ldr-led}
+ \lstinputlisting{\LocLDRardcode/ldr-led/ldr-led.ino}
\end{ardcode}
\section{Interfacing the LDR through Scilab}
@@ -229,73 +229,73 @@ The reader should go through the instructions given in % where the input argument 1 is fixed for this kit, and the port number corresponds to the analog pin of \arduino that needs to be read. We will carry out two experiments using Scilab.
\begin{enumerate}
-\item In the first experiment, we will read the LDR values and display it in
-\scilab\ Console. The code for this experiment is
-given in \sciref{sci:ldr-read}. As explained earlier in \secref{sec:light-sci},
-we begin with serial port initialization. Then, we read the input coming from
-analog pin 5 using the following command:
-\lstinputlisting[firstline=4,lastline=4]
- {\LocLDRscicode/ldr-read.sce}
- Note that the one leg of the LDR on
- the shield is connected to analog pin 5 of \arduino\,
- as given in \figref{fig:ldrconn}. The read value is displayed in the
- \scilab\ Console by the following command:
- \lstinputlisting[firstline=5,lastline=5]
- {\LocLDRscicode/ldr-read.sce} where {\tt val} contains
- the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
- reading will be 0. If on the other hand, a bright light, say for instance the torch
- light from mobile, is shined, the value displayed is close to 1023. One will get
- intermediate values by keeping one’s finger on the LDR. To
- encourage the user to have a good hands-on, we run these commands in
- a {\tt for} loop for 500 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
- observe the change in values being printed on the \scilab\ Console.
-
-
-% We use \sciref{sci:ldr-read} to read the LDR values. We find the
-% port number from the computer settings and give it as input to the
-% {\tt open\_serial} command to start serial port communication. In
-% our case, the port number is 2. Next, we shall fetch LDR values
-% using the command, {\tt cmd\_analog\_in}, as explained above. This
-% is indicated on line 4 of the code. We run this command in a {\tt
-% for} loop 20 times. In each iteration of the {\tt for} loop, we
-% acquire LDR data fed to analog pin 5, display it in the Scilab
-% command window and suspend Scilab operation for 500
-% milliseconds. The output of this experiment is displayed on the Scilab command
-% window. After reading the values, we close the serial port using the
-% command, {\tt close\_serial}, of Scilab-Arduino toolbox.
-
-% \item In this experiment, we will observe the saturation point of LDR,
-% see \sciref{sci:ldr-led}. We know that as incident light intensity
-% increases, voltage at analog input of the \arduino\ board
-% increases. Thus the ADC values being read by the \arduino\ board also
-% increase. But after certain high intensity, ADC values reach its
-% maximum. For 10 bit ADC in Arduino, this high intensity corresponds
-% to 1023. Beyond this value, the LDR is incapable of sensing the
-% change in light intensity and is considered to be saturated. To
-% observe this saturation point, we can do a simple task of exposing
-% LDR to high intensity. We can put a torch/light source sensor to
-% close proximity of LDR.
-\item This experiment is an extension of the previous
-experiment. Here, depending the resistance of the LDR, we will
- turn the red LED on. The program for this is available at
- \sciref{sci:ldr-led}. The value of LDR is read and stored in {\tt
- val}. In case it is below some threshold (like 300 in \ardref{ard:ldr-led}),
- it puts a high in pin number 11. From \secref{sec:led-pril},
- one can note that this pin is for the red LED. If the LDR value is below 300,
- the red LED will be on, else, it will be turned off.
- This loop is repeated 2,000 times. While running this experiment, the readers
- must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
- they can observe whether the red LED is turned on.
+ \item In the first experiment, we will read the LDR values and display it in
+ \scilab\ Console. The code for this experiment is
+ given in \sciref{sci:ldr-read}. As explained earlier in \secref{sec:light-sci},
+ we begin with serial port initialization. Then, we read the input coming from
+ analog pin 5 using the following command:
+ \lstinputlisting[firstline=4,lastline=4]
+ {\LocLDRscicode/ldr-read.sce}
+ Note that the one leg of the LDR on
+ the shield is connected to analog pin 5 of \arduino\,
+ as given in \figref{fig:ldrconn}. The read value is displayed in the
+ \scilab\ Console by the following command:
+ \lstinputlisting[firstline=5,lastline=5]
+ {\LocLDRscicode/ldr-read.sce} where {\tt val} contains
+ the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
+ reading will be 0. If on the other hand, a bright light, say for instance the torch
+ light from mobile, is shined, the value displayed is close to 1023. One will get
+ intermediate values by keeping one’s finger on the LDR. To
+ encourage the user to have a good hands-on, we run these commands in
+ a {\tt for} loop for 500 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
+ observe the change in values being printed on the \scilab\ Console.
+
+
+ % We use \sciref{sci:ldr-read} to read the LDR values. We find the
+ % port number from the computer settings and give it as input to the
+ % {\tt open\_serial} command to start serial port communication. In
+ % our case, the port number is 2. Next, we shall fetch LDR values
+ % using the command, {\tt cmd\_analog\_in}, as explained above. This
+ % is indicated on line 4 of the code. We run this command in a {\tt
+ % for} loop 20 times. In each iteration of the {\tt for} loop, we
+ % acquire LDR data fed to analog pin 5, display it in the Scilab
+ % command window and suspend Scilab operation for 500
+ % milliseconds. The output of this experiment is displayed on the Scilab command
+ % window. After reading the values, we close the serial port using the
+ % command, {\tt close\_serial}, of Scilab-Arduino toolbox.
+
+ % \item In this experiment, we will observe the saturation point of LDR,
+ % see \sciref{sci:ldr-led}. We know that as incident light intensity
+ % increases, voltage at analog input of the \arduino\ board
+ % increases. Thus the ADC values being read by the \arduino\ board also
+ % increase. But after certain high intensity, ADC values reach its
+ % maximum. For 10 bit ADC in Arduino, this high intensity corresponds
+ % to 1023. Beyond this value, the LDR is incapable of sensing the
+ % change in light intensity and is considered to be saturated. To
+ % observe this saturation point, we can do a simple task of exposing
+ % LDR to high intensity. We can put a torch/light source sensor to
+ % close proximity of LDR.
+ \item This experiment is an extension of the previous
+ experiment. Here, depending on the resistance of the LDR, we will
+ turn the red LED on. The program for this is available at
+ \sciref{sci:ldr-led}. The value of LDR is read and stored in {\tt
+ val}. In case it is below some threshold (like 300 in \ardref{ard:ldr-led}),
+ it puts a high in pin number 11. From \secref{sec:led-pril},
+ one can note that this pin is for the red LED. If the LDR value is below 300,
+ the red LED will be on, else, it will be turned off.
+ This loop is repeated 2,000 times. While running this experiment, the readers
+ must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
+ they can observe whether the red LED is turned on.
\end{enumerate}
\begin{exercise}
-Carry out the exercise below:
-\begin{enumerate}
-\item Carry out the exercise in the previous section.
-\item Calculate the difference in LDR readings in indoor room
- before lighting the lamp and after lighting the lamp. You can also
- record changes in the room lighting at different times of the day.
-\end{enumerate}
+ Carry out the exercise below:
+ \begin{enumerate}
+ \item Carry out the exercise in the previous section.
+ \item Calculate the difference in LDR readings in indoor room
+ before lighting the lamp and after lighting the lamp. You can also
+ record changes in the room lighting at different times of the day.
+ \end{enumerate}
\end{exercise}
\subsection{Scilab Code}
@@ -303,23 +303,23 @@ Carry out the exercise below: \addtocontents{cod}{\protect\addvspace{\codclr}}
\begin{scicode}
-\ccaption{Read and display the LDR values}
-{Read and display the LDR values. Available at
- \LocLDRscibrief{ldr-read.sce}.}
-\label{sci:ldr-read}
-\lstinputlisting{\LocLDRscicode/ldr-read.sce}
+ \ccaption{Read and display the LDR values}
+ {Read and display the LDR values. Available at
+ \LocLDRscibrief{ldr-read.sce}.}
+ \label{sci:ldr-read}
+ \lstinputlisting{\LocLDRscicode/ldr-read.sce}
\end{scicode}
\begin{scicode}
-\ccaption{Turning the red LED on and off}
-{Turning the red LED on and off. Available at
- \LocLDRscibrief{ldr-led.sce}.}
-\label{sci:ldr-led}
-\lstinputlisting{\LocLDRscicode/ldr-led.sce}
+ \ccaption{Turning the red LED on and off}
+ {Turning the red LED on and off. Available at
+ \LocLDRscibrief{ldr-led.sce}.}
+ \label{sci:ldr-led}
+ \lstinputlisting{\LocLDRscicode/ldr-led.sce}
\end{scicode}
\section{Interfacing the LDR through Xcos}
-Next, we shall perform the above mentioned experiment, to read LDR
+Next, we shall perform the above mentioned experiments, to read LDR
values, through Xcos. We will carry out the same two experiments as in the previous
sections. For each, will give the location
of the zcos file and the parameters to set. The reader should go
@@ -327,133 +327,133 @@ through the instructions given in \secref{sec:xcos-start} before getting started.
\begin{enumerate}
-\item First we will read the LDR values and display it. When the
-file required for this experiment is invoked, one gets the GUI as in
-\figref{fig:ldr-read}. In the caption of this figure, one
-can see where to locate the file.
-
-As discussed in earlier chapters, we start with the initialization
-of the serial port. Next, using {\tt Analog Read} block, we read
-the values of LDR connected on analog pin 5. Next, we use a scope to plot the values
-coming from this pin. When this Xcos file is simulated, a plot is opened,
-as shown in \figref{fig:ldr-read-plot}.
-
- \begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocLDRfig/ldr-read-xcos.PNG}
- \caption[Xcos diagram to read LDR values]{Xcos diagram to read LDR
- values.
- This is what one sees when
- \LocLDRscibrief{ldr-read.zcos}, is invoked.}
- \label{fig:ldr-read}
- \end{figure}
-
- \begin{figure}
- \centering
- \includegraphics[width=\hgfig]{\LocLDRfig/ldr-read-plot.PNG}
- \caption{Plot window in Xcos to read LDR values}
- \label{fig:ldr-read-plot}
- \end{figure}
-
- We will next explain how to set the parameters for this simulation.
- To set value on any block, one needs to right click and open the
- {\tt Block Parameters} or double click. The values for each block
- is tabulated in \tabref{tab:ldr-read}. All other parameters are to
- be left unchanged.
- \begin{table}
- \centering
- \caption{Xcos parameters to read LDR}
- \label{tab:ldr-read}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & 2\portcmd \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
- & Sampling period(s) & 0.1 \\ \hline
- ANALOG\_READ\_SB & Analog Pin & 5 \\
- & Arduino card number & 1 \\ \hline
- CSCOPE & Ymin & 0 \\
- & Ymax & 1023 \\
- & Refresh period & 100 \\ \hline
- CLOCK\_c & Period & 0.1 \\
- & Initialisation Time & 0 \\ \hline
- \end{tabular}
- \end{table}
-
- During this experiment, we vary the light incident on LDR by using
- light sources and obstacles such as torch light, paper,
- hand (or fingertips), etc. and observe the LDR readings in the plot, as shown in
- \figref{fig:ldr-read-plot}. We observe that with a constant light source, the LDR output saturates after some time.
-%The output for this experiment is shown in \figref{fig:ldrsatout}.
-
-% \begin{figure}
-% \centering
-% \includegraphics[width=\lgfig]{\LocLDRfig/ldr-sat-out.png}
-% \caption[LDR output for varying intensity of incident light, as
-% seen in Xcos] {LDR output for varying intensity of
-% incident light, as seen in Xcos. This is what one sees when
-% {\tt \LocLDRscibrief/ldr-read-xcos.zcos} is invoked.}
-% \label{fig:ldrsatout}
-% \end{figure}
-
-\item In the second experiment, we take a step further and control the
-state of red LED in accordance with the LDR values. When the file required for this
- experiment is invoked, one gets the GUI as in \figref{fig:ldr-led}.
- In the caption of this figure, one can see where to locate the file.
-
- \begin{figure}
- \centering
- \includegraphics[width=\lgfig]{\LocLDRfig/ldr-led-2.png}
-% \includegraphics[width=\smfig]{\LocLDRfig/ldr-led-xcos.PNG}
- \caption[Xcos diagram to read the value of the LDR, which is used
- to turn the blue LED on or off] {Xcos diagram to read the value of
- the LDR, which is used to turn the blue LED on or off. This is
- what one sees when \LocLDRscibrief{ldr-led-xcos.zcos}, is
- invoked.}
- \label{fig:ldr-led}
- \end{figure}
-
- We will next explain how to set the parameters for this simulation.
- To set value on any block, one needs to right click and open the
- {\tt Block Parameters} or double click. The values for each block
- is tabulated in \tabref{tab:ldr-led}. In the CSCOPE\_c block, the
- two values correspond to two graphs, one for digital write and other
- for analog read values. All other parameters are to be left
- unchanged. When this Xcos file is simulated, a plot is opened,
- as shown in \figref{fig:ldr-led-read-plot}.
-
- \begin{figure}
- \centering
- \includegraphics[width=\hgfig]{\LocLDRfig/ldr-led-read-plot.PNG}
- \caption{Plot window in Xcos to read LDR values and the state of LED}
- \label{fig:ldr-led-read-plot}
- \end{figure}
-
- \begin{table}
- \centering
- \caption{Xcos parameters to read LDR and regulate blue LED}
- \label{tab:ldr-led}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & 2\portcmd \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
- & Sampling period(s) & 0.1 \\ \hline
- ANALOG\_READ\_SB & Analog pin & 5 \\
- & Arduino card number & 1 \\ \hline
- CMSCOPE & Ymin & 0 0 \\
- & Ymax & 1 1023 \\
- & Refresh period & 100 100 \\ \hline
- CLOCK\_c & Period & 0.1 \\
- & Initialisation time & 0 \\ \hline
- SWITCH2\_m & Datatype & 1 \\
- & threshold & 300 \\
- & pass first input if field & 0 \\
- & use zero crossing & 1 \\ \hline
- DIGITAL\_WRITE\_SB & Digital pin & 9 \\
- & Arduino card number & 1 \\ \hline
- \end{tabular}
- \end{table}
+ \item First we will read the LDR values and display it. When the
+ file required for this experiment is invoked, one gets the GUI as in
+ \figref{fig:ldr-read}. In the caption of this figure, one
+ can see where to locate the file.
+
+ As discussed in earlier chapters, we start with the initialization
+ of the serial port. Next, using {\tt Analog Read} block, we read
+ the values of LDR connected on analog pin 5. Next, we use a scope to plot the values
+ coming from this pin. When this Xcos file is simulated, a plot is opened,
+ as shown in \figref{fig:ldr-read-plot}.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\smfig]{\LocLDRfig/ldr-read-xcos.PNG}
+ \caption[Xcos diagram to read LDR values]{Xcos diagram to read LDR
+ values.
+ This is what one sees when
+ \LocLDRscibrief{ldr-read.zcos}, is invoked.}
+ \label{fig:ldr-read}
+ \end{figure}
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\hgfig]{\LocLDRfig/ldr-read-plot.PNG}
+ \caption{Plot window in Xcos to read LDR values}
+ \label{fig:ldr-read-plot}
+ \end{figure}
+
+ We will next explain how to set the parameters for this simulation.
+ To set value on any block, one needs to right click and open the
+ {\tt Block Parameters} or double click. The values for each block
+ is tabulated in \tabref{tab:ldr-read}. All other parameters are to
+ be left unchanged.
+ \begin{table}
+ \centering
+ \caption{Xcos parameters to read LDR}
+ \label{tab:ldr-read}
+ \begin{tabular}{llc} \hline
+ Name of the block & Parameter name & Value \\ \hline
+ ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
+ & Serial com port number & 2\portcmd \\ \hline
+ TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
+ & Sampling period(s) & 0.1 \\ \hline
+ ANALOG\_READ\_SB & Analog Pin & 5 \\
+ & Arduino card number & 1 \\ \hline
+ CSCOPE & Ymin & 0 \\
+ & Ymax & 1023 \\
+ & Refresh period & 100 \\ \hline
+ CLOCK\_c & Period & 0.1 \\
+ & Initialisation Time & 0 \\ \hline
+ \end{tabular}
+ \end{table}
+
+ During this experiment, we vary the light incident on LDR by using
+ light sources and obstacles such as torch light, paper,
+ hand (or fingertips), etc. and observe the LDR readings in the plot, as shown in
+ \figref{fig:ldr-read-plot}. We observe that with a constant light source, the LDR output saturates after some time.
+ %The output for this experiment is shown in \figref{fig:ldrsatout}.
+
+ % \begin{figure}
+ % \centering
+ % \includegraphics[width=\lgfig]{\LocLDRfig/ldr-sat-out.png}
+ % \caption[LDR output for varying intensity of incident light, as
+ % seen in Xcos] {LDR output for varying intensity of
+ % incident light, as seen in Xcos. This is what one sees when
+ % {\tt \LocLDRscibrief/ldr-read-xcos.zcos} is invoked.}
+ % \label{fig:ldrsatout}
+ % \end{figure}
+
+ \item In the second experiment, we take a step further and control the
+ state of red LED in accordance with the LDR values. When the file required for this
+ experiment is invoked, one gets the GUI as in \figref{fig:ldr-led}.
+ In the caption of this figure, one can see where to locate the file.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\lgfig]{\LocLDRfig/ldr-led-2.png}
+ % \includegraphics[width=\smfig]{\LocLDRfig/ldr-led-xcos.PNG}
+ \caption[Xcos diagram to read the value of the LDR, which is used
+ to turn the blue LED on or off] {Xcos diagram to read the value of
+ the LDR, which is used to turn the blue LED on or off. This is
+ what one sees when \LocLDRscibrief{ldr-led-xcos.zcos}, is
+ invoked.}
+ \label{fig:ldr-led}
+ \end{figure}
+
+ We will next explain how to set the parameters for this simulation.
+ To set value on any block, one needs to right click and open the
+ {\tt Block Parameters} or double click. The values for each block
+ is tabulated in \tabref{tab:ldr-led}. In the CSCOPE\_c block, the
+ two values correspond to two graphs, one for digital write and other
+ for analog read values. All other parameters are to be left
+ unchanged. When this Xcos file is simulated, a plot is opened,
+ as shown in \figref{fig:ldr-led-read-plot}.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\hgfig]{\LocLDRfig/ldr-led-read-plot.PNG}
+ \caption{Plot window in Xcos to read LDR values and the state of LED}
+ \label{fig:ldr-led-read-plot}
+ \end{figure}
+
+ \begin{table}
+ \centering
+ \caption{Xcos parameters to read LDR and regulate blue LED}
+ \label{tab:ldr-led}
+ \begin{tabular}{llc} \hline
+ Name of the block & Parameter name & Value \\ \hline
+ ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
+ & Serial com port number & 2\portcmd \\ \hline
+ TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
+ & Sampling period(s) & 0.1 \\ \hline
+ ANALOG\_READ\_SB & Analog pin & 5 \\
+ & Arduino card number & 1 \\ \hline
+ CMSCOPE & Ymin & 0 0 \\
+ & Ymax & 1 1023 \\
+ & Refresh period & 100 100 \\ \hline
+ CLOCK\_c & Period & 0.1 \\
+ & Initialisation time & 0 \\ \hline
+ SWITCH2\_m & Datatype & 1 \\
+ & threshold & 300 \\
+ & pass first input if field & 0 \\
+ & use zero crossing & 1 \\ \hline
+ DIGITAL\_WRITE\_SB & Digital pin & 9 \\
+ & Arduino card number & 1 \\ \hline
+ \end{tabular}
+ \end{table}
\end{enumerate}
\section{Interfacing the LDR through Python}
@@ -467,60 +467,60 @@ The reader should go through the instructions given in \secref{sec:python-start} before getting started.
\begin{enumerate}
-\item In the first experiment, we will read the LDR values. The code for this experiment is given in
-\pyref{py:ldr-read}. As explained earlier in \secref{sec:light-py}, we begin with
-importing necessary modules followed by setting up the serial port.
-Then, we read the input coming from analog pin 5 using the
-following command:
-\lstinputlisting[firstline=26,lastline=26]
-{\LocLDRpycode/ldr-read.py} Note that the one leg of the LDR on
-the shield is connected to analog pin 5 of \arduino\,
-as given in \figref{fig:ldrconn}. The read value is displayed
- by the following command:
-\lstinputlisting[firstline=27,lastline=27]
-{\LocLDRpycode/ldr-read.py} where {\tt val} contains
-the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
-reading will be 0. If on the other hand, a bright light, say for instance the torch
-light from mobile, is shined, the value displayed is close to 1023. One will get
-intermediate values by keeping one's finger on the LDR. To
-encourage the user to have a good hands-on, we run these commands in
-a {\tt for} loop for 20 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
-observe the change in values being printed on on the
-Command Prompt (on Windows) or Terminal (on Linux), as the case maybe.
-
-\item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
- turn the red LED on. The program for this is available at
- \pyref{py:ldr-led}. The value of LDR is read and stored in {\tt
- val}. In case it is below some threshold (like 300 in \pyref{py:ldr-led}),
- it puts a high in pin number 11. From \secref{sec:led-pril},
- one can note that this pin is for the red LED. If the LDR value is below 300,
- the red LED will be on, else, it will be turned off.
- This loop is repeated 100 times. While running this experiment, the readers
- must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
- they can observe whether the red LED is turned on.
-
-
-% In this experiment, we will observe the saturation point of LDR,
-% see \pyref{py:ldr-led}. We know that as incident light intensity
-% increases, voltage at analog input of the \arduino\ board
-% increases. Thus the ADC values being read by the \arduino\ board also
-% increase. But after certain high intensity, ADC values reach its
-% maximum. For 10 bit ADC in Arduino, this high intensity corresponds
-% to 1023. Beyond this value, the LDR is incapable of sensing the
-% change in light intensity and is considered to be saturated. To
-% observe this saturation point, we can do a simple task of exposing
-% LDR to high intensity. We can put a torch/light source sensor to
-% close proximity of LDR.
+ \item In the first experiment, we will read the LDR values. The code for this experiment is given in
+ \pyref{py:ldr-read}. As explained earlier in \secref{sec:light-py}, we begin with
+ importing necessary modules followed by setting up the serial port.
+ Then, we read the input coming from analog pin 5 using the
+ following command:
+ \lstinputlisting[firstline=26,lastline=26]
+ {\LocLDRpycode/ldr-read.py} Note that the one leg of the LDR on
+ the shield is connected to analog pin 5 of \arduino\,
+ as given in \figref{fig:ldrconn}. The read value is displayed
+ by the following command:
+ \lstinputlisting[firstline=27,lastline=27]
+ {\LocLDRpycode/ldr-read.py} where {\tt val} contains
+ the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
+ reading will be 0. If on the other hand, a bright light, say for instance the torch
+ light from mobile, is shined, the value displayed is close to 1023. One will get
+ intermediate values by keeping one's finger on the LDR. To
+ encourage the user to have a good hands-on, we run these commands in
+ a {\tt for} loop for 20 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
+ observe the change in values being printed on on the
+ Command Prompt (on Windows) or Terminal (on Linux), as the case maybe.
+
+ \item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
+ turn the red LED on. The program for this is available at
+ \pyref{py:ldr-led}. The value of LDR is read and stored in {\tt
+ val}. In case it is below some threshold (like 300 in \pyref{py:ldr-led}),
+ it puts a high in pin number 11. From \secref{sec:led-pril},
+ one can note that this pin is for the red LED. If the LDR value is below 300,
+ the red LED will be on, else, it will be turned off.
+ This loop is repeated 100 times. While running this experiment, the readers
+ must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
+ they can observe whether the red LED is turned on.
+
+
+ % In this experiment, we will observe the saturation point of LDR,
+ % see \pyref{py:ldr-led}. We know that as incident light intensity
+ % increases, voltage at analog input of the \arduino\ board
+ % increases. Thus the ADC values being read by the \arduino\ board also
+ % increase. But after certain high intensity, ADC values reach its
+ % maximum. For 10 bit ADC in Arduino, this high intensity corresponds
+ % to 1023. Beyond this value, the LDR is incapable of sensing the
+ % change in light intensity and is considered to be saturated. To
+ % observe this saturation point, we can do a simple task of exposing
+ % LDR to high intensity. We can put a torch/light source sensor to
+ % close proximity of LDR.
\end{enumerate}
\begin{exercise}
-Carry out the exercise below:
-\begin{enumerate}
-\item Carry out the exercise in the previous section.
-\item Calculate the difference in LDR readings in indoor room
- before lighting the lamp and after lighting the lamp. You can also
- record changes in the room lighting at different times of the day.
-\end{enumerate}
+ Carry out the exercise below:
+ \begin{enumerate}
+ \item Carry out the exercise in the previous section.
+ \item Calculate the difference in LDR readings in indoor room
+ before lighting the lamp and after lighting the lamp. You can also
+ record changes in the room lighting at different times of the day.
+ \end{enumerate}
\end{exercise}
\subsection{Python Code}
@@ -528,19 +528,19 @@ Carry out the exercise below: \addtocontents{pyd}{\protect\addvspace{\codclr}}
\begin{pycode}
-\pcaption{Read and display the LDR values}
-{Read and display the LDR values. Available at
- \LocLDRpybrief{ldr-read.py}.}
-\label{py:ldr-read}
-\lstinputlisting{\LocLDRpycode/ldr-read.py}
+ \pcaption{Read and display the LDR values}
+ {Read and display the LDR values. Available at
+ \LocLDRpybrief{ldr-read.py}.}
+ \label{py:ldr-read}
+ \lstinputlisting{\LocLDRpycode/ldr-read.py}
\end{pycode}
\begin{pycode}
-\pcaption{Turning the red LED on and off}
-{Turning the red LED on and off. Available at
- \LocLDRpybrief{ldr-led.py}.}
-\label{py:ldr-led}
-\lstinputlisting{\LocLDRpycode/ldr-led.py}
+ \pcaption{Turning the red LED on and off}
+ {Turning the red LED on and off. Available at
+ \LocLDRpybrief{ldr-led.py}.}
+ \label{py:ldr-led}
+ \lstinputlisting{\LocLDRpycode/ldr-led.py}
\end{pycode}
\section{Interfacing the LDR through Julia}
@@ -554,48 +554,48 @@ The reader should go through the instructions given in \secref{sec:julia-start} \begin{enumerate}
-\item In the first experiment, we will read the LDR values. The code for this experiment is given in
-\juliaref{julia:ldr-read}. As explained earlier in \secref{sec:light-julia}, we begin with importing the SerialPorts
-\cite{julia-serial-ports} package and the module ArduinoTools followed by setting up the serial port.
-Then, we read the input coming from analog pin 5 using the
-following command:
-\lstinputlisting[firstline=6,lastline=6]
-{\LocLDRjuliacode/ldr-read.jl} Note that the one leg of the LDR on
-the shield is connected to analog pin 5 of \arduino\,
-as given in \figref{fig:ldrconn}. The read value is displayed
- by the following command:
-\lstinputlisting[firstline=7,lastline=7]
-{\LocLDRjuliacode/ldr-read.jl} where {\tt val} contains
-the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
-reading will be 0. If on the other hand, a bright light, say for instance the torch
-light from mobile, is shined, the value displayed is close to 1023. One will get
-intermediate values by keeping one's finger on the LDR. To
-encourage the user to have a good hands-on, we run these commands in
-a {\tt for} loop for 20 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
-observe the change in values being printed on on the
-Command Prompt (on Windows) or Terminal (on Linux), as the case maybe.
-
-
-\item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
- turn the red LED on. The program for this is available at
- \juliaref{julia:ldr-led}. The value of LDR is read and stored in {\tt
- val}. In case it is below some threshold (like 300 in \juliaref{julia:ldr-led}),
- it puts a high in pin number 11. From \secref{sec:led-pril},
- one can note that this pin is for the red LED. If the LDR value is below 300,
- the red LED will be on, else, it will be turned off.
- This loop is repeated 500 times. While running this experiment, the readers
- must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
- they can observe whether the red LED is turned on.
+ \item In the first experiment, we will read the LDR values. The code for this experiment is given in
+ \juliaref{julia:ldr-read}. As explained earlier in \secref{sec:light-julia}, we begin with importing the SerialPorts
+ \cite{julia-serial-ports} package and the module ArduinoTools followed by setting up the serial port.
+ Then, we read the input coming from analog pin 5 using the
+ following command:
+ \lstinputlisting[firstline=6,lastline=6]
+ {\LocLDRjuliacode/ldr-read.jl} Note that the one leg of the LDR on
+ the shield is connected to analog pin 5 of \arduino\,
+ as given in \figref{fig:ldrconn}. The read value is displayed
+ by the following command:
+ \lstinputlisting[firstline=7,lastline=7]
+ {\LocLDRjuliacode/ldr-read.jl} where {\tt val} contains
+ the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
+ reading will be 0. If on the other hand, a bright light, say for instance the torch
+ light from mobile, is shined, the value displayed is close to 1023. One will get
+ intermediate values by keeping one's finger on the LDR. To
+ encourage the user to have a good hands-on, we run these commands in
+ a {\tt for} loop for 20 iterations. While running this experiment, the readers must keep their fingertips on the LDR and
+ observe the change in values being printed on on the
+ Command Prompt (on Windows) or Terminal (on Linux), as the case maybe.
+
+
+ \item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
+ turn the red LED on. The program for this is available at
+ \juliaref{julia:ldr-led}. The value of LDR is read and stored in {\tt
+ val}. In case it is below some threshold (like 300 in \juliaref{julia:ldr-led}),
+ it puts a high in pin number 11. From \secref{sec:led-pril},
+ one can note that this pin is for the red LED. If the LDR value is below 300,
+ the red LED will be on, else, it will be turned off.
+ This loop is repeated 500 times. While running this experiment, the readers
+ must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
+ they can observe whether the red LED is turned on.
\end{enumerate}
\begin{exercise}
-Carry out the exercise below:
-\begin{enumerate}
-\item Carry out the exercise in the previous section.
-\item Calculate the difference in LDR readings in indoor room
- before lighting the lamp and after lighting the lamp. You can also
- record changes in the room lighting at different times of the day.
-\end{enumerate}
+ Carry out the exercise below:
+ \begin{enumerate}
+ \item Carry out the exercise in the previous section.
+ \item Calculate the difference in LDR readings in indoor room
+ before lighting the lamp and after lighting the lamp. You can also
+ record changes in the room lighting at different times of the day.
+ \end{enumerate}
\end{exercise}
\subsection{Julia Code}
@@ -603,19 +603,19 @@ Carry out the exercise below: \addtocontents{juliad}{\protect\addvspace{\codclr}}
\begin{juliacode}
-\jcaption{Read and display the LDR values}
-{Read and display the LDR values. Available at
- \LocLDRjuliabrief{ldr-read.jl}.}
-\label{julia:ldr-read}
-\lstinputlisting{\LocLDRjuliacode/ldr-read.jl}
+ \jcaption{Read and display the LDR values}
+ {Read and display the LDR values. Available at
+ \LocLDRjuliabrief{ldr-read.jl}.}
+ \label{julia:ldr-read}
+ \lstinputlisting{\LocLDRjuliacode/ldr-read.jl}
\end{juliacode}
\begin{juliacode}
-\jcaption{Turning the red LED on and off}
-{Turning the red LED on and off. Available at
- \LocLDRjuliabrief{ldr-led.jl}.}
-\label{julia:ldr-led}
-\lstinputlisting{\LocLDRjuliacode/ldr-led.jl}
+ \jcaption{Turning the red LED on and off}
+ {Turning the red LED on and off. Available at
+ \LocLDRjuliabrief{ldr-led.jl}.}
+ \label{julia:ldr-led}
+ \lstinputlisting{\LocLDRjuliacode/ldr-led.jl}
\end{juliacode}
\section{Interfacing the LDR through OpenModelica}
@@ -629,33 +629,33 @@ The reader should go through the instructions given in \secref{sec:OpenModelica-start} before getting started.
\begin{enumerate}
-\item In the first experiment, we will read the LDR values. The code for this experiment is given in
-\OpenModelicaref{OpenModelica:ldr-read} . As explained earlier in \secref{sec:light-OpenModelica},
- we begin with importing the two packages: Streams and SerialCommunication followed
- by setting up the serial port. Then, we read the input coming from analog pin 5 using the
-following command:
-\lstinputlisting[firstline=15,lastline=15]
-{\LocLDROpenModelicacode/ldr-read.mo} Note that the one leg of the LDR on
-the shield is connected to analog pin 5 of \arduino\,
-as given in \figref{fig:ldrconn}. The read value is displayed
- by the following command:
-\lstinputlisting[firstline=16,lastline=16]
-{\LocLDROpenModelicacode/ldr-read.mo} where {\tt val} contains
-the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
-reading will be 0. If on the other hand, a bright light, say for instance the torch
-light from mobile, is shined, the value displayed is close to 1023. One will get
-intermediate values by keeping one's finger on the LDR. While simulating this experiment, the readers must keep their fingertips on the LDR and
-observe the change in values being printed on on the output window of OMEdit, as shown in \figref{om-sim-success}.
-
-\item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
- turn the red LED on. The program for this is available at
- \OpenModelicaref{OpenModelica:ldr-led}. The value of LDR is read and stored in {\tt
- val}. In case it is below some threshold (like 300 in \OpenModelicaref{OpenModelica:ldr-led}),
- it puts a high in pin number 11. From \secref{sec:led-pril},
- one can note that this pin is for the red LED. If the LDR value is below 300,
- the red LED will be on, else, it will be turned off. While running this experiment, the readers
- must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
- they can observe whether the red LED is turned on.
+ \item In the first experiment, we will read the LDR values. The code for this experiment is given in
+ \OpenModelicaref{OpenModelica:ldr-read} . As explained earlier in \secref{sec:light-OpenModelica},
+ we begin with importing the two packages: Streams and SerialCommunication followed
+ by setting up the serial port. Then, we read the input coming from analog pin 5 using the
+ following command:
+ \lstinputlisting[firstline=15,lastline=15]
+ {\LocLDROpenModelicacode/ldr-read.mo} Note that the one leg of the LDR on
+ the shield is connected to analog pin 5 of \arduino\,
+ as given in \figref{fig:ldrconn}. The read value is displayed
+ by the following command:
+ \lstinputlisting[firstline=16,lastline=16]
+ {\LocLDROpenModelicacode/ldr-read.mo} where {\tt val} contains
+ the LDR values ranging from 0 to 1023. If one does the experiment in a completely dark room, the
+ reading will be 0. If on the other hand, a bright light, say for instance the torch
+ light from mobile, is shined, the value displayed is close to 1023. One will get
+ intermediate values by keeping one's finger on the LDR. While simulating this experiment, the readers must keep their fingertips on the LDR and
+ observe the change in values being printed on on the output window of OMEdit, as shown in \figref{om-sim-success}.
+
+ \item This experiment is an extension of the previous experiment. Here, depending the resistance of the LDR, we will
+ turn the red LED on. The program for this is available at
+ \OpenModelicaref{OpenModelica:ldr-led}. The value of LDR is read and stored in {\tt
+ val}. In case it is below some threshold (like 300 in \OpenModelicaref{OpenModelica:ldr-led}),
+ it puts a high in pin number 11. From \secref{sec:led-pril},
+ one can note that this pin is for the red LED. If the LDR value is below 300,
+ the red LED will be on, else, it will be turned off. While running this experiment, the readers
+ must keep their fingertips on the LDR so that the threshold is achieved. Accordingly,
+ they can observe whether the red LED is turned on.
\end{enumerate}
\subsection{OpenModelica Code}
@@ -663,19 +663,19 @@ observe the change in values being printed on on the output window of OMEdit, as \addtocontents{OpenModelicad}{\protect\addvspace{\codclr}}
\begin{OpenModelicacode}
-\mcaption{Read and display the LDR values}
-{Read and display the LDR values. Available at
- \LocLDROpenModelicabrief{ldr-read.mo}.}
-\label{OpenModelica:ldr-read}
-\lstinputlisting{\LocLDROpenModelicacode/ldr-read.mo}
+ \mcaption{Read and display the LDR values}
+ {Read and display the LDR values. Available at
+ \LocLDROpenModelicabrief{ldr-read.mo}.}
+ \label{OpenModelica:ldr-read}
+ \lstinputlisting{\LocLDROpenModelicacode/ldr-read.mo}
\end{OpenModelicacode}
\begin{OpenModelicacode}
-\mcaption{Turning the red LED on and off}
-{Turning the red LED on and off. Available at
- \LocLDROpenModelicabrief{ldr-led.mo}.}
-\label{OpenModelica:ldr-led}
-\lstinputlisting{\LocLDROpenModelicacode/ldr-led.mo}
+ \mcaption{Turning the red LED on and off}
+ {Turning the red LED on and off. Available at
+ \LocLDROpenModelicabrief{ldr-led.mo}.}
+ \label{OpenModelica:ldr-led}
+ \lstinputlisting{\LocLDROpenModelicacode/ldr-led.mo}
\end{OpenModelicacode}
diff --git a/user-code/thermistor/OpenModelica/therm-buzzer.mo b/user-code/thermistor/OpenModelica/therm-buzzer.mo index 52a9e5d..9c4e0e2 100644 --- a/user-code/thermistor/OpenModelica/therm-buzzer.mo +++ b/user-code/thermistor/OpenModelica/therm-buzzer.mo @@ -3,7 +3,7 @@ model therm_buzzer "Sound buzzer depending on thermistor readings" import sComm = Arduino.SerialCommunication.Functions;
import strm = Modelica.Utilities.Streams;
Integer ok(fixed = false);
- Integer analog_in(fixed = false);
+ Integer val(fixed = false);
Integer digital_out(fixed = false);
Integer c_ok(fixed = false);
algorithm
@@ -14,13 +14,14 @@ algorithm strm.print("Unable to open serial port, please check");
else
for i in 1:500 loop
- analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 4";
- if analog_in > 500 then
+ val := sComm.cmd_analog_in(1, 4) "read analog pin 4";
+ strm.print("Thermistor Readings: " + String(val));
+ if val > 550 then
digital_out := sComm.cmd_digital_out(1, 3, 1) "Turn ON Buzzer";
else
digital_out := sComm.cmd_digital_out(1, 3, 0) "Turn OFF Buzzer";
end if;
- sComm.delay(200);
+ sComm.delay(500);
end for;
end if;
end when;
diff --git a/user-code/thermistor/OpenModelica/therm-read.mo b/user-code/thermistor/OpenModelica/therm-read.mo index 1e4ba75..4e212f8 100644 --- a/user-code/thermistor/OpenModelica/therm-read.mo +++ b/user-code/thermistor/OpenModelica/therm-read.mo @@ -3,7 +3,7 @@ model therm_read "Thermistor Readings" import sComm = Arduino.SerialCommunication.Functions;
import strm = Modelica.Utilities.Streams;
Integer ok(fixed = false);
- Integer analog_in(fixed = false);
+ Integer val(fixed = false);
Integer c_ok(fixed = false);
algorithm
when initial() then
@@ -13,8 +13,8 @@ algorithm strm.print("Unable to open serial port, please check");
else
for i in 1:20 loop
- analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 5 (ldr)";
- strm.print("Thermistor Readings " + " : " + String(analog_in));
+ val := sComm.cmd_analog_in(1, 4) "read analog pin 4 (thermistor)";
+ strm.print("Thermistor Readings: " + String(val));
sComm.delay(500);
end for;
end if;
diff --git a/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino b/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino index 831b670..6ff308f 100644 --- a/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino +++ b/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino @@ -1,23 +1,23 @@ -int value; +int val; int i; void setup() { - pinMode(3,OUTPUT); + pinMode(3, OUTPUT); Serial.begin(115200); - for(i=1;i<100;i++) + for(i = 1; i < 100; i++) { - value=analogRead(A4); //read value from thermistor - Serial.println(value); //display + val = analogRead(A4); //read value from thermistor + Serial.println(val); //display - if(value>550) + if(value > 550) { - digitalWrite(3,HIGH); // Turn ON buzzer + digitalWrite(3, HIGH); // Turn ON buzzer } else { - digitalWrite(3,LOW); // Turn OFF buzzer + digitalWrite(3, LOW); // Turn OFF buzzer } delay(500); } @@ -25,4 +25,4 @@ void setup() void loop() { -}
+} diff --git a/user-code/thermistor/arduino/therm-read/therm-read.ino b/user-code/thermistor/arduino/therm-read/therm-read.ino index 44405c1..e749f87 100644 --- a/user-code/thermistor/arduino/therm-read/therm-read.ino +++ b/user-code/thermistor/arduino/therm-read/therm-read.ino @@ -1,13 +1,13 @@ -int value; +int val; int i; void setup() { Serial.begin(115200); - for(i=1;i<=40;i++) + for(i = 1; i <= 40; i++) { - value=analogRead(A4); //read value from thermistor - Serial.println(value); //display + val = analogRead(A4); //read value from thermistor + Serial.println(val); //display delay(500); } @@ -15,4 +15,4 @@ void setup() void loop() { -}
+} diff --git a/user-code/thermistor/julia/therm-buzzer.jl b/user-code/thermistor/julia/therm-buzzer.jl index 053f858..144e5ed 100644 --- a/user-code/thermistor/julia/therm-buzzer.jl +++ b/user-code/thermistor/julia/therm-buzzer.jl @@ -2,14 +2,15 @@ using SerialPorts include("ArduinoTools.jl") ser = ArduinoTools.connectBoard(115200) -ArduinoTools.pinMode(ser,3,"OUTPUT") +ArduinoTools.pinMode(ser, 3, "OUTPUT") for i = 1:50 - p = ArduinoTools.analogRead(ser,4) - println(p) - if p > 550 - ArduinoTools.digiWrite(ser,3,1) + val = ArduinoTools.analogRead(ser, 4) + println(val) + if (val > 550) + ArduinoTools.digiWrite(ser, 3, 1) else - ArduinoTools.digiWrite(ser,3,0) + ArduinoTools.digiWrite(ser, 3, 0) end + sleep(0.5) end close(ser) diff --git a/user-code/thermistor/julia/therm-read.jl b/user-code/thermistor/julia/therm-read.jl index be76cf6..5a1e064 100644 --- a/user-code/thermistor/julia/therm-read.jl +++ b/user-code/thermistor/julia/therm-read.jl @@ -4,8 +4,8 @@ include("ArduinoTools.jl") ser = ArduinoTools.connectBoard(115200) for i = 1:20 - p = ArduinoTools.analogRead(ser,4) - println(p) + val = ArduinoTools.analogRead(ser, 4) + println(val) sleep(0.5) end close(ser) diff --git a/user-code/thermistor/python/therm-buzzer.py b/user-code/thermistor/python/therm-buzzer.py index faa430a..e72a7b2 100644 --- a/user-code/thermistor/python/therm-buzzer.py +++ b/user-code/thermistor/python/therm-buzzer.py @@ -1,46 +1,43 @@ import os
import sys
-cwd=os.getcwd()
-(setpath,Examples)=os.path.split(cwd)
-#print setpath
+cwd = os.getcwd()
+(setpath, Examples) = os.path.split(cwd)
sys.path.append(setpath)
from Arduino.Arduino import Arduino
from time import sleep
class THERM_BUZZER:
- def __init__(self,baudrate):
- self.baudrate=baudrate
+ def __init__(self, baudrate):
+ self.baudrate = baudrate
self.setup()
self.run()
self.exit()
def setup(self):
- self.obj_arduino=Arduino()
- self.port=self.obj_arduino.locateport()
- self.obj_arduino.open_serial(1,self.port,self.baudrate)
+ self.obj_arduino = Arduino()
+ self.port = self.obj_arduino.locateport()
+ self.obj_arduino.open_serial(1, self.port, self.baudrate)
def run(self):
- self.therm=4
- self.buzzer=3
+ self.therm = 4
+ self.buzzer = 3
for i in range(20):
- val=self.obj_arduino.cmd_analog_in(1,self.therm)
- print (val)
+ val = self.obj_arduino.cmd_analog_in(1, self.therm)
+ print(val)
if (int(val) > 550):
- self.obj_arduino.cmd_digital_out(1,self.buzzer,1)
-
-
+ self.obj_arduino.cmd_digital_out(1, self.buzzer, 1)
else:
- self.obj_arduino.cmd_digital_out(1,self.buzzer,0)
- sleep(2)
+ self.obj_arduino.cmd_digital_out(1, self.buzzer, 0)
+ sleep(0.5)
def exit(self):
self.obj_arduino.close_serial()
def main():
- obj_pot=THERM_BUZZER(115200)
+ obj_pot = THERM_BUZZER(115200)
-if __name__=='__main__':
+if __name__== '__main__':
main()
diff --git a/user-code/thermistor/python/therm-read.py b/user-code/thermistor/python/therm-read.py index 8d8da20..7d7eeb2 100644 --- a/user-code/thermistor/python/therm-read.py +++ b/user-code/thermistor/python/therm-read.py @@ -1,8 +1,7 @@ import os
import sys
-cwd=os.getcwd()
-(setpath,Examples)=os.path.split(cwd)
-#print setpath
+cwd = os.getcwd()
+(setpath,Examples) = os.path.split(cwd)
sys.path.append(setpath)
from Arduino.Arduino import Arduino
@@ -10,31 +9,29 @@ from time import sleep class THERM_BUZZER:
def __init__(self,baudrate):
- self.baudrate=baudrate
+ self.baudrate = baudrate
self.setup()
self.run()
self.exit()
def setup(self):
- self.obj_arduino=Arduino()
- self.port=self.obj_arduino.locateport()
- self.obj_arduino.open_serial(1,self.port,self.baudrate)
+ self.obj_arduino = Arduino()
+ self.port = self.obj_arduino.locateport()
+ self.obj_arduino.open_serial(1, self.port, self.baudrate)
def run(self):
- self.therm=4
-
-
+ self.therm = 4
+
for i in range(20):
- val=self.obj_arduino.cmd_analog_in(1,self.therm)
- print (val)
+ val = self.obj_arduino.cmd_analog_in(1, self.therm)
+ print(val)
sleep(0.5)
-
def exit(self):
self.obj_arduino.close_serial()
def main():
- obj_pot=THERM_BUZZER(115200)
+ obj_pot = THERM_BUZZER(115200)
-if __name__=='__main__':
+if __name__== '__main__':
main()
diff --git a/user-code/thermistor/scilab/therm-buzzer.sce b/user-code/thermistor/scilab/therm-buzzer.sce index 31fac70..6850202 100644 --- a/user-code/thermistor/scilab/therm-buzzer.sce +++ b/user-code/thermistor/scilab/therm-buzzer.sce @@ -1,13 +1,13 @@ -ok=open_serial(1,2,115200); // port 2, baudrate 115200
-if ok~=0 then error('Unable to open serial port, please check'); end
-for i=1:500 //Run for 500 iterations
- p=cmd_analog_in(1,4) // read analog pin 4 (thermistor)
- disp(p);
- if(p>550) // Setting Threshold value of 550
- cmd_digital_out(1,3,1) // Turn ON BUZZER
+ok = open_serial(1, 2, 115200); // port 2, baudrate 115200
+if ok ~= 0 then error('Unable to open serial port, please check'); end
+for i = 1:500 //Run for 500 iterations
+ val = cmd_analog_in(1, 4) // read analog pin 4 (thermistor)
+ disp(val);
+ if(val > 550) // Setting Threshold value of 550
+ cmd_digital_out(1, 3, 1) // Turn ON BUZZER
else
- cmd_digital_out(1,3,0) // Turn OFF BUZZER
+ cmd_digital_out(1, 3, 0) // Turn OFF BUZZER
end
sleep(500);
end
-close_serial(1)
+close_serial(1);
diff --git a/user-code/thermistor/scilab/therm-buzzer-xcos.zcos b/user-code/thermistor/scilab/therm-buzzer.zcos Binary files differindex 2b8d5b3..2b8d5b3 100644 --- a/user-code/thermistor/scilab/therm-buzzer-xcos.zcos +++ b/user-code/thermistor/scilab/therm-buzzer.zcos diff --git a/user-code/thermistor/scilab/therm-read.sce b/user-code/thermistor/scilab/therm-read.sce index 9b124d3..6dcbdfa 100644 --- a/user-code/thermistor/scilab/therm-read.sce +++ b/user-code/thermistor/scilab/therm-read.sce @@ -1,9 +1,8 @@ -
-ok=open_serial(1,2,115200); // Port 2 with baudrate 115200
-if ok~=0 then error('Unable to open serial port. Please check') end
-for i=1:20 // Run for 20 iterations
- p=cmd_analog_in(1,4); // read analog pin 4 (thermistor)
- disp(p);
- sleep(500) // Delay of 500 milliseconds
+ok = open_serial(1, 2, 115200); // Port 2 with baudrate 115200
+if ok ~= 0 then error('Unable to open serial port. Please check') end
+for i = 1:20 // Run for 20 iterations
+ val = cmd_analog_in(1, 4); // read analog pin 4 (thermistor)
+ disp(val);
+ sleep(500); // Delay of 500 milliseconds
end
-c = close_serial(1) // close serial connection
+c = close_serial(1); // close serial connection
diff --git a/user-code/thermistor/scilab/therm-read-xcos.zcos b/user-code/thermistor/scilab/therm-read.zcos Binary files differindex c853ae8..c853ae8 100644 --- a/user-code/thermistor/scilab/therm-read-xcos.zcos +++ b/user-code/thermistor/scilab/therm-read.zcos diff --git a/user-code/thermistor/thermistor.tex b/user-code/thermistor/thermistor.tex index e607563..40b7c83 100644 --- a/user-code/thermistor/thermistor.tex +++ b/user-code/thermistor/thermistor.tex @@ -5,27 +5,27 @@ \newcommand{\LocTHERMfig}{\Origin/user-code/thermistor/figures} \newcommand{\LocTHERMscicode}{\Origin/user-code/thermistor/scilab} \newcommand{\LocTHERMscibrief}[1]{{\tt \seqsplit{% -Origin/user-code/thermistor/scilab/#1}}, see \fnrefp{fn:file-loc}} + Origin/user-code/thermistor/scilab/#1}}, see \fnrefp{fn:file-loc}} \newcommand{\LocTHERMardcode}{\Origin/user-code/thermistor/arduino} \newcommand{\LocTHERMardbrief}[1]{{\tt \seqsplit{% -Origin/user-code/thermistor/arduino/#1}}, see \fnrefp{fn:file-loc}} + Origin/user-code/thermistor/arduino/#1}}, see \fnrefp{fn:file-loc}} %%%%%%%%%%%python starts \newcommand{\LocTHERMpycode}{\Origin/user-code/thermistor/python} \newcommand{\LocTHERMpybrief}[1]{{\tt \seqsplit{% -Origin/user-code/thermistor/python/#1}}, see \fnrefp{fn:file-loc}} + Origin/user-code/thermistor/python/#1}}, see \fnrefp{fn:file-loc}} %%%%%%%%%%%python ends %%%%%%%%%julia \newcommand{\LocTHERMjuliacode}{\Origin/user-code/thermistor/julia} \newcommand{\LocTHERMjuliabrief}[1]{{\tt \seqsplit{% - Origin/user-code/thermistor/julia/#1}}, see \fnrefp{fn:file-loc}} + Origin/user-code/thermistor/julia/#1}}, see \fnrefp{fn:file-loc}} %%%%%%julia %%%%%%%%%OpenModelica starts \newcommand{\LocTHERMOpenModelicacode}{\Origin/user-code/thermistor/OpenModelica} \newcommand{\LocTHERMOpenModelicabrief}[1]{{\tt \seqsplit{% - Origin/user-code/thermistor/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} + Origin/user-code/thermistor/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} %%%%%%OpenModelica ends A thermistor, usually made of semiconductors or metallic oxides, is a @@ -37,7 +37,7 @@ Coefficient. In NTC thermistors, the resistance decreases with the increase in temperature and vice versa. Whereas, for PTC types, the resistance increases with an increase in temperature and vice versa. The temperature ranges, typically, from $-55^{\circ}$ Celsius -to $+125^{\circ}$ Celsius. +to $+125^{\circ}$ Celsius. Thermistors are available in a variety of shapes such as beads, rods, flakes, and discs. Due to their compact size and low cost, they are @@ -64,47 +64,47 @@ connect any wire or component explicitly. \begin{figure} -\centering -\subfloat[Pictorial representation of a thermistor\cite{therm-wiki}]{ -\includegraphics[width=\smfig]{\LocTHERMfig/NTC-bead.jpg} -\label{fig:therm}} \hfill -\subfloat[Symbolic representation of a thermistor]{ -\includegraphics[width=\tnfig]{\LocTHERMfig/therm-sym.png} -\label{fig:thermsym}} -\caption{Pictorial and symbolic representation of a thermistor} + \centering + \subfloat[Pictorial representation of a thermistor\cite{therm-wiki}]{ + \includegraphics[width=\smfig]{\LocTHERMfig/NTC-bead.jpg} + \label{fig:therm}} \hfill + \subfloat[Symbolic representation of a thermistor]{ + \includegraphics[width=\tnfig]{\LocTHERMfig/therm-sym.png} + \label{fig:thermsym}} + \caption{Pictorial and symbolic representation of a thermistor} \end{figure} \begin{figure} -\centering -\subfloat[Thermistor connection diagram]{ -\includegraphics[width=\smfig] -{\LocTHERMfig/THERMISTOR-Diagram-crop.pdf} -\label{fig:therm-conn}} \hfill -\subfloat[Buzzer connection diagram]{ -\includegraphics[width=\smfig] -{\LocTHERMfig/BUZZER-Diagram-crop.pdf} -\label{fig:buzzer-conn}} -\caption{Thermistor and buzzer connection diagrams} + \centering + \subfloat[Thermistor connection diagram]{ + \includegraphics[width=\smfig] + {\LocTHERMfig/THERMISTOR-Diagram-crop.pdf} + \label{fig:therm-conn}} \hfill + \subfloat[Buzzer connection diagram]{ + \includegraphics[width=\smfig] + {\LocTHERMfig/BUZZER-Diagram-crop.pdf} + \label{fig:buzzer-conn}} + \caption{Thermistor and buzzer connection diagrams} \end{figure} \section{Connecting a thermistor with \arduino\ using a breadboard} This section is useful for those who either don't have a shield or don't want to use the shield -for performing the experiments given in this chapter. +for performing the experiments given in this chapter. -A breadboard is a device for holding the components of a circuit and connecting -them together. We can build an electronic circuit on a breadboard without doing any -soldering. To know more about the breadboard and other electronic components, +A breadboard is a device for holding the components of a circuit and connecting +them together. We can build an electronic circuit on a breadboard without doing any +soldering. To know more about the breadboard and other electronic components, one should watch the Spoken Tutorials on Arduino as published on -{\tt https://spoken-tutorial.org/}. Ideally, one should go through all the + {\tt https://spoken-tutorial.org/}. Ideally, one should go through all the tutorials labeled as Basic. However, we strongly recommend the readers should -watch the fifth and sixth tutorials, i.e., First Arduino Program and -Arduino with Tricolor LED and Push button. +watch the fifth and sixth tutorials, i.e., {\tt First Arduino Program} and + {\tt Arduino with Tricolor LED and Push button}. -In case you have a thermistor, and you want to connect it with \arduino\ on a breadboard, -please refer to \figref{fig:ard-therm-bread}. The connections given in this figure +In case you have a thermistor, and you want to connect it with \arduino\ on a breadboard, +please refer to \figref{fig:ard-therm-bread}. The connections given in this figure can be used to read values from the thermistor connected to analog pin 4 on \arduino\ -board. +board. \begin{figure} \centering \includegraphics[width=\textwidth]{\LocTHERMfig/thermistor.png} @@ -112,12 +112,12 @@ board. %\redcolor{connected on pin no. D12}} \label{fig:ard-therm-bread} \end{figure} -As shown in \figref{fig:ard-therm-bread}, one leg of the thermistor is connected -to 5V on \arduino\ and the other leg to the analog pin 4 on  \arduino. A resistor is also -connected to the same leg and grounded. From \figref{fig:therm-conn} and \figref{fig:ard-therm-bread}, one can infer that a resistor -along with the thermistor is used to create a voltage divider circuit. The varying -resistance of the thermistor is converted to a varying voltage. Finally, this voltage is used -by the analog pin 4 of \arduino\ in its logic. +As shown in \figref{fig:ard-therm-bread}, one leg of the thermistor is connected +to 5V on \arduino\ and the other leg to the analog pin 4 on  \arduino. A resistor is also +connected to the same leg and grounded. From \figref{fig:therm-conn} and \figref{fig:ard-therm-bread}, one can infer that a resistor +along with the thermistor is used to create a voltage divider circuit. The varying +resistance of the thermistor is converted to a varying voltage. Finally, this voltage is used +by the analog pin 4 of \arduino\ in its logic. \begin{figure} \centering @@ -126,56 +126,81 @@ by the analog pin 4 of \arduino\ in its logic. %\redcolor{connected on pin no. D12}} \label{fig:ard-therm-buzzer} \end{figure} -The connections shown in \figref{fig:ard-therm-buzzer} can be used to control a buzzer, -depending on the values from the thermistor. As shown in \figref{fig:ard-therm-buzzer}, -digital pin 3 on \arduino\ is connected to the one of the legs of the buzzer. Another -leg of the buzzer is connected to GND of \arduino. +The connections shown in \figref{fig:ard-therm-buzzer} can be used to control a buzzer, +depending on the values from the thermistor. As shown in \figref{fig:ard-therm-buzzer}, +digital pin 3 on \arduino\ is connected to the one of the legs of the buzzer. Another +leg of the buzzer is connected to GND of \arduino. \section{Interfacing the Thermistor from the Arduino IDE} \subsection{Interfacing the Thermistor} In this section we will learn how to read values from the thermistor connected at pin 4 of the \arduino\ board. We shall also see how to -drive a buzzer depending upon the thermistor values. +drive a buzzer depending upon the thermistor values. The shield has to be attached to the \arduino\ board +before doing these experiments and the \arduino\ needs to be connected to the computer +with a USB cable, as shown in \figref{arduino}. The reader should go through the +instructions given in \secref{sec:ard-start} before getting started. \begin{enumerate} -\item A simple code to read the values from thermistor is given in \ardref{ard:therm-read}. The arduino IDE based command for the analog read functionality is given by. -\lstinputlisting[firstline=9,lastline=9] {\LocTHERMardcode/therm-read/therm-read.ino} -where {\tt A4} represents the analog pin 4 to be read. The read value is stored in variable {\tt value} and is displayed using \lstinputlisting[firstline=10,lastline=10] {\LocTHERMardcode/therm-read/therm-read.ino} -The command on next line - -\lstinputlisting[firstline=11,lastline=11] {\LocTHERMardcode/therm-read/therm-read.ino} - is used to put a delay of 500 milliseconds. This is to avoid very fast display of the read values. The entire reading and display operation is carried out 40 times. - -The values can be observed over the serial monitor. The numbers -displayed range from 0 to 1023. At room temperature you may get the -output of ADC around 500. If a heating or cooling source is available, -one can observe the increase or decrease in the ADC output. Although -the thermistor is of NTC type, the ADC output increases with increase -in temperature. This is because the voltage across the fixed resistor -is sensed. - -\item In this experiment, we will turn the buzzer on and off depending - on the temperature sensed by the thermistor. The program for this is - available at \ardref{ard:therm-buzzer}. We shall use the ADC output - to carry this out. The buzzer is connected on pin 3 which is a - digital output pin. The ADC output value is displayed on the serial - monitor. At the same time it is compared with value 550. Temperature - of the thermistor can be raised by just holding it for a - while. Doing so will transfer heat from the person holding the - thermistor, thereby raising the temperature of the thermistor. As - soon as the ADC output exceeds 550, the buzzer is given a digital - high signal, turning it On. A delay of half a second is introduced - before the next value is read. This loop is executed 100 times. + \item A simple code to read the values from thermistor is given in + \ardref{ard:therm-read}. The Arduino IDE based command for the analog read functionality is given by. + \lstinputlisting[firstline=9,lastline=9]{\LocTHERMardcode/therm-read/therm-read.ino} + where {\tt A4} represents the analog pin 4 to be read. + The read value is stored in variable {\tt val} and is + displayed using \lstinputlisting[firstline=10,lastline=10]{\LocTHERMardcode/therm-read/therm-read.ino} + The command on next line + + \lstinputlisting[firstline=11,lastline=11] {\LocTHERMardcode/therm-read/therm-read.ino} + is used to put a delay of 500 milliseconds. This is to avoid very fast display of the read values. The entire reading and display operation is carried out 40 times. + + The values can be observed over the {\tt Serial Monitor} of Arduino IDE. + The numbers displayed range from 0 to 1023. At room temperature you may get the + output of ADC around 500. If a heating or cooling source is available, + one can observe the increase or decrease in the ADC output. Although + the thermistor is of NTC type, the ADC output increases with increase + in temperature. This is because the voltage across the fixed resistor + is sensed. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. Accordingly, they should observe the change in the thermistor values + on the {\tt Serial Monitor}. + + \item In this experiment, we will turn the buzzer on and off depending + on the temperature sensed by the thermistor. The program for this is + available at \ardref{ard:therm-buzzer}. We shall use the ADC output + to carry this out. The buzzer is connected on pin 3 which is a + digital output pin. The ADC output value is displayed on the serial + monitor. At the same time it is compared with value 550. As + soon as the ADC output exceeds 550, the buzzer is given a digital + high signal, turning it on. The following lines of code perform this + comparison and sending a {HIGH} signal to digital pin 3 on \arduino: + \lstinputlisting[firstline=14,lastline=21]{\LocTHERMardcode/therm-buzzer/therm-buzzer.ino} + A delay of half a second is introduced + before the next value is read. This loop is executed 100 times. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like \ardref{ard:therm-read}. + \end{enumerate} \begin{exercise} -Carry out the following exercise: -\begin{enumerate} -\item Put the thermistor in the vicinity of an Ice bowl. Take care not - to wet the shield while doing so. Note down the ADC output value for - 0$^{\circ}$Celsius. -\end{enumerate} + Carry out the following exercise: + \begin{enumerate} + \item Put the thermistor in the vicinity of an Ice bowl. Take care not + to wet the shield while doing so. Note down the ADC output value for + 0$^{\circ}$Celsius. + \end{enumerate} \end{exercise} \subsection{Arduino Code} @@ -186,8 +211,8 @@ Carry out the following exercise: \acaption{Read and display the thermistor values} {Read and display the thermistor values. Available at \LocTHERMardbrief{therm-read/therm-read.ino}.} -\label{ard:therm-read} -\lstinputlisting{\LocTHERMardcode/therm-read/therm-read.ino} + \label{ard:therm-read} + \lstinputlisting{\LocTHERMardcode/therm-read/therm-read.ino} \end{ardcode} \begin{ardcode} @@ -195,81 +220,131 @@ Carry out the following exercise: {Turning the buzzer on and off using the thermistor values read by ADC. Available at \LocTHERMardbrief{therm-buzzer/therm-buzzer.ino}.} -\label{ard:therm-buzzer} -\lstinputlisting{\LocTHERMardcode/therm-buzzer/therm-buzzer.ino} + \label{ard:therm-buzzer} + \lstinputlisting{\LocTHERMardcode/therm-buzzer/therm-buzzer.ino} \end{ardcode} \section{Interfacing the Thermistor from \scilab} \subsection{Interfacing the Thermistor} -In this section we will explain a few \scilab\ scripts to read values -from thermistor and to use them. The {\tt cmd\_analog\_in} command -will be used to read from thermistor connected to an analog input -pin. The experiments will be carried out using \scilab. +In this section we will explain a \scilab\ script to read the thermistor +values. Based on the acquired values, we will change +the state of the buzzer. The shield has to be attached to the \arduino\ board +before doing these experiments and the \arduino\ needs to be connected to the computer +with a USB cable, as shown in \figref{arduino}. +The reader should go through the instructions given in +\secref{sec:sci-start} before getting started. + +% The {\tt cmd\_analog\_in} command +% will be used to read from thermistor connected to an analog input +% pin. The experiments will be carried out using \scilab. \begin{enumerate} -\item In the first experiment, \sciref{sci:therm-read} is used to read - values from thermistor. First the serial port is opened using the - command {\tt open\_serial} and passing the correct port number to - it. The command {\tt cmd\_analog\_in} is used to read from the - analog pin. The pin number is passed to this command as an - argument. The read value is stored in some variable. The value is - then displayed on the scilab console. A sleep of 500 millisecond is - executed using the {\tt sleep} command and then the reading process - is repeated 20 times by putting it in a {\tt for} loop. After the - loop is finished the serial port is closed using the {\tt - close\_serial} command. - -\item In the second experiment, we will use the \scilab\ script to - turn a buzzer on and off using the thermistor values. The changes in - the thermistor resistance is sensed as a voltage change between 0 to - 5V. The ADC maps the thermistor voltage readings in to values - ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 - volts. In this experiment we compare the ADC output value with 550 - and as soon as the value exceeds 550 the buzzer is turned on. See - \sciref{sci:therm-buzzer} for the complete code. We use {\tt if} - loop to achieve this functionality. Command {\tt cmd\_digital\_out} - is used to turn the buzzer on and off. The correct port number on - which the buzzer is connected is passed to this command as an - argument. The entire process is repeated 500 times. + \item In the first experiment, we will read the thermistor values and display it in + \scilab\ Console. The code for this experiment is + given in \sciref{sci:therm-read}. As explained earlier in \secref{sec:light-sci}, + we begin with serial port initialization. Then, we read the input coming from + analog pin 4 using the following command: + \lstinputlisting[firstline=4,lastline=4] + {\LocTHERMscicode/therm-read.sce} + Note that the one leg of the thermistor on + the shield is connected to analog pin 4 of \arduino\, + as given in \figref{fig:therm-conn}. The read value is stored in variable {\tt val} and + displayed in the \scilab\ Console by the following command: + \lstinputlisting[firstline=5,lastline=5] + {\LocTHERMscicode/therm-read.sce} where {\tt val} contains + the thermistor values ranging from 0 to 1023. The changes in + the thermistor resistance is sensed as a voltage change between 0 to + 5V. The ADC maps the thermistor voltage readings in to values + ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + volts. At room temperature you may get the + output of ADC around 500. If a heating or cooling source is available, + one can observe the increase or decrease in the ADC output. To + encourage the user to have a good hands-on, we run these commands in + a {\tt for} loop for 20 iterations. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. Accordingly, they should observe the change in the thermistor + values on \scilab\ Console. + + + % In the first experiment, \sciref{sci:therm-read} is used to read + % values from thermistor. First the serial port is opened using the + % command {\tt open\_serial} and passing the correct port number to + % it. The command {\tt cmd\_analog\_in} is used to read from the + % analog pin. The pin number is passed to this command as an + % argument. The read value is stored in some variable. The value is + % then displayed on the scilab console. A sleep of 500 millisecond is + % executed using the {\tt sleep} command and then the reading process + % is repeated 20 times by putting it in a {\tt for} loop. After the + % loop is finished the serial port is closed using the {\tt + % close\_serial} command. + + \item This experiment is an extension of the previous + experiment. Here, we will use a \scilab\ script to + turn a buzzer on and off using the thermistor values. + The program for this is available at + \sciref{sci:therm-buzzer}. As explained earlier, + the ADC maps the thermistor voltage readings in to values + ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + volts. In this experiment we compare the ADC output value with 550 + and as soon as the value exceeds 550 the buzzer is turned on. The following lines of code perform this + comparison and sending a {HIGH} signal to digital pin 3 on \arduino: + \lstinputlisting[firstline=6,lastline=10]{\LocTHERMscicode/therm-buzzer.sce} + A delay of half a second is introduced + before the next value is read. This loop is executed 500 times. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like \sciref{sci:therm-read}. \end{enumerate} \begin{exercise} Carry out the exercise below: Convert the ADC output readings to degree Celsius. There are two ways to do so. -\begin{enumerate} -\item In the first method, -\begin{align} -\frac{1}{T}=A+B*\ln(R)+C*(\ln(R))^3 -\label{therm-abc} -\end{align} -equation \ref{therm-abc} can be used if the value of A, B, C and R are -known. The temperature T is in kelvin and thermistor resistance R is -in ohms. The values of A, B and C can be found out by measuring -thermistor resistance against three known values of temperatures. The -values of temperature must be within the operating range and should -typically include the room temperature. Once a set of three values of -T and R are known it will result in three equations with three -unknowns. The values of A, B, C can be found out by solving the three -equations simultaneously. Once the values of A, B, C are known, the -same equation can be used to directly convert resistance to kelvin. It -can be then converted to Celsius. This method is preferred when the -temperature coefficient of thermistor is not known or is known very -approximately. This method is bit cumbersome but can give accurate -temperature conversion. - -\item In the second method, -\begin{align} -\frac{1}{T}=\frac{1}{T_0}+\frac{1}{\beta}*\ln\left(\frac{R}{R_0}\right) -\label{therm-beta} -\end{align} -equation \ref{therm-beta} can be used if the value of $\beta$ i.e. the -Temperature Coefficient of Resistance of the thermistor used is -known. The value of $\beta$ can be found in the data sheet of the -thermistor used. $R$ is the resistance of thermistor at temperature -$T$ in kelvin. $R_0$ is the resistance of thermistor at room -temperature $T_0$ in kelvin. -\end{enumerate} + \begin{enumerate} + \item In the first method, + \begin{align} + \frac{1}{T}=A+B*\ln(R)+C*(\ln(R))^3 + \label{therm-abc} + \end{align} + equation \ref{therm-abc} can be used if the value of A, B, C and R are + known. The temperature T is in kelvin and thermistor resistance R is + in ohms. The values of A, B and C can be found out by measuring + thermistor resistance against three known values of temperatures. The + values of temperature must be within the operating range and should + typically include the room temperature. Once a set of three values of + T and R are known it will result in three equations with three + unknowns. The values of A, B, C can be found out by solving the three + equations simultaneously. Once the values of A, B, C are known, the + same equation can be used to directly convert resistance to kelvin. It + can be then converted to Celsius. This method is preferred when the + temperature coefficient of thermistor is not known or is known very + approximately. This method is bit cumbersome but can give accurate + temperature conversion. + + \item In the second method, + \begin{align} + \frac{1}{T}=\frac{1}{T_0}+\frac{1}{\beta}*\ln\left(\frac{R}{R_0}\right) + \label{therm-beta} + \end{align} + equation \ref{therm-beta} can be used if the value of $\beta$ i.e. the + Temperature Coefficient of Resistance of the thermistor used is + known. The value of $\beta$ can be found in the data sheet of the + thermistor used. $R$ is the resistance of thermistor at temperature + $T$ in kelvin. $R_0$ is the resistance of thermistor at room + temperature $T_0$ in kelvin. + \end{enumerate} \end{exercise} \subsection{Scilab Code} @@ -280,163 +355,242 @@ temperature $T_0$ in kelvin. \ccaption{Read and display the thermistor values} {Read and display the thermistor values. Available at \LocTHERMscibrief{therm-read.sce}.} -\label{sci:therm-read} -\lstinputlisting{\LocTHERMscicode/therm-read.sce} + \label{sci:therm-read} + \lstinputlisting{\LocTHERMscicode/therm-read.sce} \end{scicode} \begin{scicode} \ccaption{Turning the buzzer on and off using thermistor values} {Turning the buzzer on and off using the thermistor values read by ADC. Available at \LocTHERMscibrief{therm-buzzer.sce}.} -\label{sci:therm-buzzer} -\lstinputlisting{\LocTHERMscicode/therm-buzzer.sce} + \label{sci:therm-buzzer} + \lstinputlisting{\LocTHERMscicode/therm-buzzer.sce} \end{scicode} \section{Interfacing the Thermistor from Xcos} -In this section we will carry out the same experiments discussed in -the previous sections but through Xcos. One should go through -\secref{sec:xcos-start} before continuing. +In this section, we discuss how to read and use the thermistor values using +Xcos blocks. The reader should go +through the instructions given in \secref{sec:xcos-start} before +getting started. \begin{enumerate} -\item The xcos diagram for performing the simple thermistor read - operation is as shown in \figref{fig:therm-read}. The location of - the xcos file is mentioned in the caption of the figure. - \begin{figure} - \centering - \includegraphics[width=\smfigp]{\LocTHERMfig/therm-read-xcos.png} - \caption[Xcos diagram to read thermistor values]{Xcos diagram to - read thermistor values. This is what one sees when - \LocTHERMscibrief{therm-read-xcos.zcos}, is invoked.} - \label{fig:therm-read} - \end{figure} - The parameters of the blocks can be changed by right clicking on the - block and choosing {\tt Block Parameters}. One can also double click - on the block. The values for each block is tabulated in - \tabref{tab:therm-read}. All other parameters are to be left - unchanged. - - \begin{table} - \centering - \caption{Xcos parameters to read thermistor} - \label{tab:therm-read} - \begin{tabular}{llc} \hline - Name of the block & Parameter name & Value \\ \hline - ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\ - & Serial com port number & 2\portcmd \\ \hline - TIME\_SAMPLE & Duration of acquisition(s) & 100 \\ - & Sampling period(s) & 0.1 \\ \hline - ANALOG\_READ\_SB & Analog Pin & 4 \\ - & Arduino card number & 1 \\ \hline - CSCOPE & Ymin & 200 \\ - & Ymax & 600 \\ - & Refresh period & 100 \\ \hline - CLOCK\_c & Period & 0.1 \\ - & Initialisation Time & 0 \\ \hline - \end{tabular} - \end{table} - \begin{figure} - \centering - \includegraphics[width=\smfigp]{\LocTHERMfig/therm-read.png} - \caption[Output of Xcos diagram to read thermistor values]{Output - of Xcos diagram to read thermistor values. This is what one - sees when \LocTHERMscibrief{therm-read-xcos.zcos}, is executed.} - \label{fig:therm-read-output} - \end{figure} - The thermistor readings can be varied by bringing a heating or - cooling source in the vicinity of it. The graph as shown in - \figref{fig:therm-read-output} will show the variations in the ADC - output that is displayed. - -\item In the second experiment, we will switch On and Off a buzzer - depending on the thermistor readings (ADC output). The xcos diagram - for this experiment is as shown in \figref{fig:therm-buzzer}. - \begin{figure} - \centering - \includegraphics[width=\lgfig]{\LocTHERMfig/therm-buzzer-xcos.png} - \caption[Xcos diagram to read the value of thermistor, which is - used to turn the buzzer on or off] {Xcos diagram to read the value - of the thermistor, which is used to turn the buzzer on or off. - This is what one sees when - \LocTHERMscibrief{therm-buzzer-xcos.zcos}, is invoked.} - \label{fig:therm-buzzer} - \end{figure} - The parameters of the blocks can be changed by right clicking on the - block and choosing {\tt Block Parameters}. One can also double click - on the block. The values for each block is tabulated in - \tabref{tab:therm-read}. All other parameters are to be left - unchanged. - -\begin{table} - \centering - \caption{Xcos parameters to read thermistor and switch the buzzer} - \label{tab:therm-buzzer} - \begin{tabular}{llc} \hline - Name of the block & Parameter name & Value \\ \hline - ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\ - & Serial com port number & 2\portcmd \\ \hline - TIME\_SAMPLE & Duration of acquisition(s) & 100 \\ - & Sampling period(s) & 0.1 \\ \hline - ANALOG\_READ\_SB & Analog pin & 4 \\ - & Arduino card number & 1 \\ \hline - CMSCOPE & Ymin & 0 300 \\ - & Ymax & 1 600 \\ - & Refresh period & 100 100 \\ \hline - CLOCK\_c & Period & 0.1 \\ - & Initialisation time & 0 \\ \hline - SWITCH2\_m & Datatype & 1 \\ - & threshold & 550 \\ - & pass first input if field & 0 \\ - & use zero crossing & 1 \\ \hline - DIGITAL\_WRITE\_SB & Digital pin & 3 \\ - & Arduino card number & 1 \\ \hline - \end{tabular} - \end{table} - The graph as shown in \figref{fig:therm-buzzer-output} will show the - variations in the ADC output that is displayed and the corresponding - switching of buzzer whenever the limits are crossed. - \begin{figure} - \centering - \includegraphics[width=\smfig]{\LocTHERMfig/therm-buzzer.png} - \caption[Output of Xcos diagram to switch buzzer through - thermistor values]{Output of Xcos diagram to switch buzzer through - thermistor values. This is what one sees when - \LocTHERMscibrief{therm-buzzer-xcos.zcos}, is executed.} - \label{fig:therm-buzzer-output} - \end{figure} + \item First we will read the thermistor values and display it. When the + file required for this experiment is invoked, one gets the GUI as in + \figref{fig:therm-read}. In the caption of this figure, one + can see where to locate the file. + + As discussed in earlier chapters, we start with the initialization + of the serial port. Next, using {\tt Analog Read} block, we read + the values of thermistor connected on analog pin 4. + Next, we use a scope to plot the values + coming from this pin. When this Xcos file is simulated, + a plot is opened, as shown in \figref{fig:therm-read-output}. + + \begin{figure} + \centering + \includegraphics[width=\smfigp]{\LocTHERMfig/therm-read-xcos.png} + \caption[Xcos diagram to read thermistor values]{Xcos diagram to + read thermistor values. This is what one sees when + \LocTHERMscibrief{therm-read.zcos}, is invoked.} + \label{fig:therm-read} + \end{figure} + + We will next explain how to set the parameters for this simulation. + To set value on any block, one needs to right click and open the + {\tt Block Parameters} or double click. The values for each block + is tabulated in \tabref{tab:therm-read}. All other parameters are to + be left unchanged. + \begin{table} + \centering + \caption{Xcos parameters to read thermistor} + \label{tab:therm-read} + \begin{tabular}{llc} \hline + Name of the block & Parameter name & Value \\ \hline + ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\ + & Serial com port number & 2\portcmd \\ \hline + TIME\_SAMPLE & Duration of acquisition(s) & 100 \\ + & Sampling period(s) & 0.1 \\ \hline + ANALOG\_READ\_SB & Analog Pin & 4 \\ + & Arduino card number & 1 \\ \hline + CSCOPE & Ymin & 200 \\ + & Ymax & 600 \\ + & Refresh period & 100 \\ \hline + CLOCK\_c & Period & 0.1 \\ + & Initialisation Time & 0 \\ \hline + \end{tabular} + \end{table} + \begin{figure} + \centering + \includegraphics[width=\smfigp]{\LocTHERMfig/therm-read.png} + \caption{Plot window in Xcos to read thermistor values} + \label{fig:therm-read-output} + \end{figure} + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. Accordingly, they should observe the change in the thermistor + values in the output plot, as shown in \figref{fig:therm-read-output}. + + \item In the second experiment, we will switch on and off a buzzer + depending on the thermistor readings (ADC output). + When the file required for this + experiment is invoked, one gets the GUI as in \figref{fig:therm-buzzer}. + In the caption of this figure, one can see where to locate the file. + + \begin{figure} + \centering + \includegraphics[width=\lgfig]{\LocTHERMfig/therm-buzzer-xcos.png} + \caption[Xcos diagram to read the value of thermistor, which is + used to turn the buzzer on or off] {Xcos diagram to read the value + of the thermistor, which is used to turn the buzzer on or off. + This is what one sees when + \LocTHERMscibrief{therm-buzzer.zcos}, is invoked.} + \label{fig:therm-buzzer} + \end{figure} + + We will next explain how to set the parameters for this simulation. + To set value on any block, one needs to right click and open the + {\tt Block Parameters} or double click. The values for each block + is tabulated in \tabref{tab:therm-buzzer}. In the CSCOPE\_c block, the + two values correspond to two graphs, one for digital write and other + for analog read values. All other parameters are to be left + unchanged. When this Xcos file is simulated, a plot is opened, + as shown in \figref{fig:therm-buzzer-output}. + + \begin{table} + \centering + \caption{Xcos parameters to read thermistor and switch the buzzer} + \label{tab:therm-buzzer} + \begin{tabular}{llc} \hline + Name of the block & Parameter name & Value \\ \hline + ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\ + & Serial com port number & 2\portcmd \\ \hline + TIME\_SAMPLE & Duration of acquisition(s) & 100 \\ + & Sampling period(s) & 0.1 \\ \hline + ANALOG\_READ\_SB & Analog pin & 4 \\ + & Arduino card number & 1 \\ \hline + CMSCOPE & Ymin & 0 300 \\ + & Ymax & 1 600 \\ + & Refresh period & 100 100 \\ \hline + CLOCK\_c & Period & 0.1 \\ + & Initialisation time & 0 \\ \hline + SWITCH2\_m & Datatype & 1 \\ + & threshold & 550 \\ + & pass first input if field & 0 \\ + & use zero crossing & 1 \\ \hline + DIGITAL\_WRITE\_SB & Digital pin & 3 \\ + & Arduino card number & 1 \\ \hline + \end{tabular} + \end{table} + + \begin{figure} + \centering + \includegraphics[width=\lgfig]{\LocTHERMfig/therm-buzzer.png} + \caption{Plot window in Xcos to read thermistor values and the state of LED} + \label{fig:therm-buzzer-output} + \end{figure} + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like the Xcos file shown in + \figref{fig:therm-read}. \end{enumerate} + \section{Interfacing the Thermistor from Python} \subsection{Interfacing the Thermistor} -In this section we will explain a few python scripts to read values -from thermistor and to use them. The {\tt cmd\_analog\_in} command -will be used to read from thermistor connected to an analog input -pin. The experiments will be carried out using python. +n this section, we discuss how to carry out the experiments of the +previous section from Python. We will list the same two experiments, +in the same order. The shield has to be attached to the \arduino\ board +before doing these experiments and the \arduino\ needs to be connected to the computer +with a USB cable, as shown in \figref{arduino}. +The reader should go through the instructions given in +\secref{sec:python-start} before getting started. \begin{enumerate} -\item In the first experiment, \pyref{py:therm-read} is used to read - values from thermistor. First the serial port is opened using the - command {\tt open\_serial} and passing the correct port number to - it. The command {\tt cmd\_analog\_in} is used to read from the - analog pin. The pin number is passed to this command as an - argument. The read value is stored in some variable. The value is - then displayed on the scilab console. A sleep of 500 millisecond is - executed using the {\tt sleep} command and then the reading process - is repeated 20 times by putting it in a {\tt for} loop. After the - loop is finished the serial port is closed using the {\tt - close\_serial} command. - -\item In the second experiment, we will use the python script to - turn a buzzer on and off using the thermistor values. The changes in - the thermistor resistance is sensed as a voltage change between 0 to - 5V. The ADC maps the thermistor voltage readings in to values - ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 - volts. In this experiment we compare the ADC output value with 550 - and as soon as the value exceeds 550 the buzzer is turned on. See - \sciref{py:therm-buzzer} for the complete code. We use {\tt if} - loop to achieve this functionality. Command {\tt cmd\_digital\_out} - is used to turn the buzzer on and off. The correct port number on - which the buzzer is connected is passed to this command as an - argument. The entire process is repeated 500 times. + \item In the first experiment, we will read the thermistor values. + The code for this experiment is given in \pyref{py:therm-read}. + As explained earlier in \secref{sec:light-py}, we begin with + importing necessary modules followed by setting up the serial port. + Then, we read the input coming from analog pin 4 using the + following command: + \lstinputlisting[firstline=26,lastline=26] + {\LocTHERMpycode/therm-read.py} Note that the one leg of the thermistor on + the shield is connected to analog pin 4 of \arduino\, + as given in \figref{fig:therm-conn}. The read value is displayed + by the following command: + \lstinputlisting[firstline=27,lastline=27] + {\LocTHERMpycode/therm-read.py} where {\tt val} contains + the thermistor values ranging from 0 to 1023. To + encourage the user to have a good hands-on, we run these commands in + a {\tt for} loop for 20 iterations. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe the change in values being printed on on the + Command Prompt (on Windows) or Terminal (on Linux), as the case maybe. + + % In the first experiment, \pyref{py:therm-read} is used to read + % values from thermistor. First the serial port is opened using the + % command {\tt open\_serial} and passing the correct port number to + % it. The command {\tt cmd\_analog\_in} is used to read from the + % analog pin. The pin number is passed to this command as an + % argument. The read value is stored in some variable. The value is + % then displayed on the scilab console. A sleep of 500 millisecond is + % executed using the {\tt sleep} command and then the reading process + % is repeated 20 times by putting it in a {\tt for} loop. After the + % loop is finished the serial port is closed using the {\tt + % close\_serial} command. + + \item This experiment is an extension of the previous + experiment. Here, we will use a Python script to + turn a buzzer on and off using the thermistor values. + The program for this is available at + \pyref{py:therm-buzzer}. As explained earlier, + the ADC maps the thermistor voltage readings in to values + ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + volts. In this experiment we compare the ADC output value with 550 + and as soon as the value exceeds 550 the buzzer is turned on. The following lines of code perform this + comparison and sending a {HIGH} signal to digital pin 3 on \arduino: + \lstinputlisting[firstline=30,lastline=34]{\LocTHERMpycode/therm-buzzer.py} + A delay of half a second is introduced + before the next value is read. This loop is executed 500 times. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like \pyref{py:therm-read}. + + % In the second experiment, we will use the python script to + % turn a buzzer on and off using the thermistor values. The changes in + % the thermistor resistance is sensed as a voltage change between 0 to + % 5V. The ADC maps the thermistor voltage readings in to values + % ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + % volts. In this experiment we compare the ADC output value with 550 + % and as soon as the value exceeds 550 the buzzer is turned on. See + % \sciref{py:therm-buzzer} for the complete code. We use {\tt if} + % loop to achieve this functionality. Command {\tt cmd\_digital\_out} + % is used to turn the buzzer on and off. The correct port number on + % which the buzzer is connected is passed to this command as an + % argument. The entire process is repeated 500 times. \end{enumerate} \subsection{Python Code} @@ -447,40 +601,79 @@ pin. The experiments will be carried out using python. \pcaption{Read and display the thermistor values} {Read and display the thermistor values. Available at \LocTHERMpybrief{therm-read.py}.} -\label{py:therm-read} -\lstinputlisting{\LocTHERMpycode/therm-read.py} + \label{py:therm-read} + \lstinputlisting{\LocTHERMpycode/therm-read.py} \end{pycode} \begin{pycode} \pcaption{Turning the buzzer on and off using thermistor values} {Turning the buzzer on and off using the thermistor values read by ADC. Available at \LocTHERMpybrief{therm-buzzer.py}.} -\label{py:therm-buzzer} -\lstinputlisting{\LocTHERMpycode/therm-buzzer.py} + \label{py:therm-buzzer} + \lstinputlisting{\LocTHERMpycode/therm-buzzer.py} \end{pycode} \section{Interfacing the Thermistor from Julia} \subsection{Interfacing the Thermistor} -In this section we will explain a few julia scripts to read values -from thermistor and to use them. The {\tt analogRead} command -will be used to read from thermistor connected to an analog input -pin. The experiments will be carried out using python. +In this section, we discuss how to carry out the experiments of the +previous section from Julia. We will list the same two experiments, +in the same order. The shield has to be attached to the \arduino\ board +before doing these experiments and the \arduino\ needs to be connected to the computer +with a USB cable, as shown in \figref{arduino}. +The reader should go through the instructions given in \secref{sec:julia-start} before getting started. + \begin{enumerate} -\item In the first experiment, \juliaref{julia:therm-read} is used to read - values from thermistor. First the serial port is opened using the - command {\tt connectBoard}. The command {\tt analogRead} is used to read from the - analog pin. The pin number is passed to this command as an - argument. The read value is stored in some variable. The value is - then displayed on the Atoms console. A sleep of 500 millisecond is - executed using the {\tt sleep} command and then the reading process - is repeated 20 times by putting it in a {\tt for} loop. After the - loop is finished the serial port is closed using the {\tt - close } command. - -\item In the second experiment, we will use the julia script to - turn a buzzer on and off using the thermistor values.The whole - process is same as described in the python code. + \item In the first experiment, we will read the thermistor values. + The code for this experiment is given in + \juliaref{julia:therm-read}. As explained earlier in \secref{sec:light-julia}, we begin with importing the SerialPorts + \cite{julia-serial-ports} package and the module ArduinoTools followed by setting up the serial port. + Then, we read the input coming from analog pin 4 using the + following command: + \lstinputlisting[firstline=7,lastline=7] + {\LocTHERMjuliacode/therm-read.jl} Note that the one leg of the thermistor on + the shield is connected to analog pin 4 of \arduino\, + as given in \figref{fig:therm-conn}. The read value is displayed + by the following command: + \lstinputlisting[firstline=8,lastline=8] + {\LocTHERMjuliacode/therm-read.jl} where {\tt val} contains + the thermistor values ranging from 0 to 1023. To + encourage the user to have a good hands-on, we run these commands in + a {\tt for} loop for 20 iterations. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe the change in values being printed on on the + Command Prompt (on Windows) or Terminal (on Linux), as the case maybe. + + \item This experiment is an extension of the previous + experiment. Here, we will use a Julia source file to + turn a buzzer on and off using the thermistor values. + The program for this is available at + \juliaref{julia:therm-buzzer}. As explained earlier, + the ADC maps the thermistor voltage readings in to values + ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + volts. In this experiment we compare the ADC output value with 550 + and as soon as the value exceeds 550 the buzzer is turned on. The following lines of code perform this + comparison and sending a {HIGH} signal to digital pin 3 on \arduino: + \lstinputlisting[firstline=9,lastline=14]{\LocTHERMjuliacode/therm-buzzer.jl} + A delay of half a second is introduced + before the next value is read. This loop is executed 50 times. + + While running this experiment, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like \juliaref{julia:therm-read}. + \end{enumerate} \subsection{Julia Code} @@ -488,53 +681,77 @@ pin. The experiments will be carried out using python. \addtocontents{juliad}{\protect\addvspace{\codclr}} \begin{juliacode} -\jcaption{Read and display the thermistor values} {Read and display - the thermistor values. Available at - \LocTHERMjuliabrief{therm-read.jl}.} -\label{julia:therm-read} -\lstinputlisting{\LocTHERMjuliacode/therm-read.jl} + \jcaption{Read and display the thermistor values} {Read and display + the thermistor values. Available at + \LocTHERMjuliabrief{therm-read.jl}.} + \label{julia:therm-read} + \lstinputlisting{\LocTHERMjuliacode/therm-read.jl} \end{juliacode} \begin{juliacode} -\jcaption{Turning the buzzer on and off using thermistor values} + \jcaption{Turning the buzzer on and off using thermistor values} {Turning the buzzer on and off using the thermistor values read by ADC. Available at \LocTHERMjuliabrief{therm-buzzer.jl}.} -\label{julia:therm-buzzer} -\lstinputlisting{\LocTHERMjuliacode/therm-buzzer.jl} + \label{julia:therm-buzzer} + \lstinputlisting{\LocTHERMjuliacode/therm-buzzer.jl} \end{juliacode} \section{Interfacing the Thermistor from OpenModelica} \subsection{Interfacing the Thermistor} -In this section we will explain a few OpenModelica scripts to read values -from thermistor and to use them. The {\tt cmd\_analog\_in} command -will be used to read from thermistor connected to an analog input -pin. The experiments will be carried out using OpenModelica. +In this section, we discuss how to carry out the experiments of the +previous section from OpenModelica. We will list the same two experiments, +in the same order. The shield has to be attached to the \arduino\ board +before doing these experiments and the \arduino\ needs to be connected to the computer +with a USB cable, as shown in \figref{arduino}. +The reader should go through the instructions given in +\secref{sec:OpenModelica-start} before getting started. \begin{enumerate} -\item In the first experiment, \OpenModelicaref{OpenModelica:therm-read} is used to read - values from thermistor. First the serial port is opened using the - command {\tt open\_serial} and passing the correct port number to - it. The command {\tt cmd\_analog\_in} is used to read from the - analog pin. The pin number is passed to this command as an - argument. The read value is stored in some variable. The value is - then displayed on the OpenModelica ourput console. A delay of 500 millisecond is - executed using the {\tt delay} command and then the reading process - is repeated 20 times by putting it in a {\tt for} loop. After the - loop is finished the serial port is closed using the {\tt - close\_serial} command. - -\item In the second experiment, we will use the OpenModelica script to - turn a buzzer on and off using the thermistor values. The changes in - the thermistor resistance is sensed as a voltage change between 0 to - 5V. The ADC maps the thermistor voltage readings in to values - ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 - volts. In this experiment we compare the ADC output value with 550 - and as soon as the value exceeds 500 the buzzer is turned on. See - \OpenModelicaref{OpenModelica:therm-buzzer} for the complete code. We use {\tt if} - loop to achieve this functionality. Command {\tt cmd\_digital\_out} - is used to turn the buzzer on and off. The correct port number on - which the buzzer is connected is passed to this command as an - argument. The entire process is repeated 500 times. + \item In the first experiment, we will read the thermistor values. The code for this experiment is given in + \OpenModelicaref{OpenModelica:therm-read}. As explained earlier in \secref{sec:light-OpenModelica}, + we begin with importing the two packages: Streams and SerialCommunication followed + by setting up the serial port. Then, we read the input coming from analog pin 4 using the + following command: + \lstinputlisting[firstline=16,lastline=16] + {\LocTHERMOpenModelicacode/therm-read.mo} Note that the one leg of the thermistor on + the shield is connected to analog pin 4 of \arduino\, + as given in \figref{fig:therm-conn}. The read value is displayed + by the following command: + \lstinputlisting[firstline=17,lastline=17] + {\LocTHERMOpenModelicacode/therm-read.mo} where {\tt val} contains + the thermistor values ranging from 0 to 1023. + + While simulating this model, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe the change in values being printed on on the output window of OMEdit, as shown in \figref{om-sim-success}. + + \item This experiment is an extension of the previous experiment. Here, + we will turn a buzzer on and off using the thermistor values. + The program for this is available at + \OpenModelicaref{OpenModelica:therm-buzzer}. As explained earlier, + the ADC maps the thermistor voltage readings in to values + ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 + volts. In this experiment we compare the ADC output value with 550 + and as soon as the value exceeds 550 the buzzer is turned on. The following lines of code perform this + comparison and sending a {HIGH} signal to digital pin 3 on \arduino: + \lstinputlisting[firstline=19,lastline=24]{\LocTHERMOpenModelicacode/therm-buzzer.mo} + A delay of 500 milliseconds is introduced + before the next value is read. + + While simulating this model, + the readers should try holding (or rubbing) the thermistor with their fingertips. + Doing so will transfer heat from the person holding the + thermistor, thereby raising the temperature of the thermistor. + Accordingly, they should observe whether the threshold of 550 is achieved + and the buzzer is enabled. + + \paragraph{Note:} Once the thermistor value reaches 550 (the threshold), the value will remain the same + (unless it is cooled). Therefore, the buzzer will continuously produce the sound, which might be + a bit annoying. To get rid of this, the readers are advised to + execute some other code on \arduino\ like \OpenModelicaref{OpenModelica:therm-read}. + \end{enumerate} \subsection{OpenModelica Code} @@ -542,17 +759,17 @@ pin. The experiments will be carried out using OpenModelica. \addtocontents{OpenModelicad}{\protect\addvspace{\codclr}} \begin{OpenModelicacode} -\mcaption{Read and display the thermistor values} {Read and display + \mcaption{Read and display the thermistor values} {Read and display the thermistor values. Available at - \LocTHERMOpenModelicabrief{therm-read.mo}.} -\label{OpenModelica:therm-read} -\lstinputlisting{\LocTHERMOpenModelicacode/therm-read.mo} + \LocTHERMOpenModelicabrief{therm-read.mo}.} + \label{OpenModelica:therm-read} + \lstinputlisting{\LocTHERMOpenModelicacode/therm-read.mo} \end{OpenModelicacode} \begin{OpenModelicacode} -\mcaption{Turning the buzzer on and off using thermistor values} + \mcaption{Turning the buzzer on and off using thermistor values} {Turning the buzzer on and off using the thermistor values read by ADC. Available at \LocTHERMOpenModelicabrief{therm-buzzer.mo}.} -\label{OpenModelica:therm-buzzer} -\lstinputlisting{\LocTHERMOpenModelicacode/therm-buzzer.mo} + \label{OpenModelica:therm-buzzer} + \lstinputlisting{\LocTHERMOpenModelicacode/therm-buzzer.mo} \end{OpenModelicacode} |