From 45a13ddb827414f7561755a822265fbf7c691d7f Mon Sep 17 00:00:00 2001 From: SudhakarKuma Date: Thu, 8 Apr 2021 17:53:15 +0530 Subject: Add pushbutton breadboard --- floss-arduino.OpenModelicad | 4 +- floss-arduino.ard | 4 +- floss-arduino.aux | 170 ++++++++++++++-------------- floss-arduino.cod | 2 +- floss-arduino.fdb_latexmk | 59 +++++----- floss-arduino.fls | 9 +- floss-arduino.juliad | 2 +- floss-arduino.lof | 7 +- floss-arduino.log | 197 ++++++++++++++++++--------------- floss-arduino.lot | 4 +- floss-arduino.pdf | Bin 23762952 -> 24013512 bytes floss-arduino.pyd | 2 +- floss-arduino.thm | 14 +-- floss-arduino.toc | 24 ++-- indent.log | 25 +++++ user-code/push/figures/ard-pushbtn.png | Bin 89079 -> 0 bytes user-code/push/figures/switch-led.png | Bin 0 -> 240149 bytes user-code/push/figures/switch.png | Bin 0 -> 220988 bytes user-code/push/push.tex | 42 +++++-- 19 files changed, 318 insertions(+), 247 deletions(-) create mode 100644 indent.log delete mode 100644 user-code/push/figures/ard-pushbtn.png create mode 100644 user-code/push/figures/switch-led.png create mode 100644 user-code/push/figures/switch.png diff --git a/floss-arduino.OpenModelicad b/floss-arduino.OpenModelicad index 2b629d1..ede2a46 100644 --- a/floss-arduino.OpenModelicad +++ b/floss-arduino.OpenModelicad @@ -5,8 +5,8 @@ \contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{80}% \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{81}% \addvspace {10pt} -\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{95}% -\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{96}% +\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{96}% +\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{97}% \addvspace {10pt} \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{113}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{114}% diff --git a/floss-arduino.ard b/floss-arduino.ard index 37eea50..131bbc7 100644 --- a/floss-arduino.ard +++ b/floss-arduino.ard @@ -5,8 +5,8 @@ \contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{61}% \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{61}% \addvspace {10pt} -\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{86}% -\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{86}% +\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{87}% +\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{87}% \addvspace {10pt} \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{103}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{103}% diff --git a/floss-arduino.aux b/floss-arduino.aux index c24862b..a6ba43d 100644 --- a/floss-arduino.aux +++ b/floss-arduino.aux @@ -480,33 +480,35 @@ \@writefile{toc}{\contentsline {section}{\numberline {5.2}Connecting a pushbutton with Arduino Uno\ using a breadboard}{83}\protected@file@percent } \@writefile{lof}{\contentsline {figure}{\numberline {5.1}{\ignorespaces Connection Diagram\relax }}{84}\protected@file@percent } \newlabel{fig:pushbuttonconn}{{5.1}{84}} -\@writefile{toc}{\contentsline {section}{\numberline {5.3}Reading the Pushbutton Status from the Arduino IDE}{84}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.1}Reading the Pushbutton Status}{84}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {5.2}{\ignorespaces Interfacing a pushbutton with Arduino Uno using a breadboard\relax }}{85}\protected@file@percent } -\newlabel{fig:ard-pushbtn-bread}{{5.2}{85}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push\textendash button\textendash status/push\textendash button\textendash status.ino}{85}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push\textendash button\textendash status/push\textendash button\textendash status.ino}{85}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led\textendash push\textendash button/led\textendash push\textendash button.ino}{86}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.2}Arduino Code}{86}\protected@file@percent } -\newlabel{sec:push-arduino-code}{{5.3.2}{86}} -\@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{5.{1}}{}}{86}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{86}\protected@file@percent } -\newlabel{47@xvr}{{}{86}} -\newlabel{47@vr}{{}{86}} -\newlabel{ard:push-100}{{5.{1}}{86}} +\@writefile{lof}{\contentsline {figure}{\numberline {5.2}{\ignorespaces A pushbutton to read its status with Arduino Uno using a breadboard\relax }}{84}\protected@file@percent } +\newlabel{fig:switch-bread}{{5.2}{84}} +\@writefile{lof}{\contentsline {figure}{\numberline {5.3}{\ignorespaces A pushbutton to control an LED with Arduino Uno using a breadboard\relax }}{85}\protected@file@percent } +\newlabel{fig:switch-led}{{5.3}{85}} +\@writefile{toc}{\contentsline {section}{\numberline {5.3}Reading the Pushbutton Status from the Arduino IDE}{86}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.1}Reading the Pushbutton Status}{86}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push\textendash button\textendash status/push\textendash button\textendash status.ino}{86}\protected@file@percent } \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push\textendash button\textendash status/push\textendash button\textendash status.ino}{86}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{5.{2}}{}}{86}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{86}\protected@file@percent } -\newlabel{48@xvr}{{}{86}} -\newlabel{48@vr}{{}{86}} -\newlabel{ard:push-200}{{5.{2}}{86}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led\textendash push\textendash button/led\textendash push\textendash button.ino}{86}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {5.4}Reading the Pushbutton Status from Scilab}{87}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.1}Reading the Pushbutton Status}{87}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push\textendash button\textendash status.sce}{87}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push\textendash button\textendash status.sce}{87}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led\textendash push\textendash button.sce}{87}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.2}Arduino Code}{87}\protected@file@percent } +\newlabel{sec:push-arduino-code}{{5.3.2}{87}} +\@writefile{ard}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{5.{1}}{}}{87}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{87}\protected@file@percent } +\newlabel{47@xvr}{{}{87}} +\newlabel{47@vr}{{}{87}} +\newlabel{ard:push-100}{{5.{1}}{87}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push\textendash button\textendash status/push\textendash button\textendash status.ino}{87}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{5.{2}}{}}{87}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{87}\protected@file@percent } +\newlabel{48@xvr}{{}{87}} +\newlabel{48@vr}{{}{87}} +\newlabel{ard:push-200}{{5.{2}}{87}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led\textendash push\textendash button/led\textendash push\textendash button.ino}{87}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {5.4}Reading the Pushbutton Status from Scilab}{88}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.1}Reading the Pushbutton Status}{88}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push\textendash button\textendash status.sce}{88}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push\textendash button\textendash status.sce}{88}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led\textendash push\textendash button.sce}{88}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {5.4.2}Scilab Code}{88}\protected@file@percent } \newlabel{sec:push-scilab-code}{{5.4.2}{88}} \@writefile{cod}{\addvspace {10pt}} @@ -516,36 +518,36 @@ \newlabel{49@vr}{{}{88}} \newlabel{sci:push-100}{{5.{1}}{88}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push\textendash button\textendash status.sce}{88}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{5.{2}}{}}{88}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{88}\protected@file@percent } -\newlabel{50@xvr}{{}{88}} -\newlabel{50@vr}{{}{88}} -\newlabel{sci:push-200}{{5.{2}}{88}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led\textendash push\textendash button.sce}{88}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {5.5}Accessing the Pushbutton from Xcos}{88}\protected@file@percent } -\newlabel{sec:push-xcos}{{5.5}{88}} -\@writefile{lof}{\contentsline {figure}{\numberline {5.3}{\ignorespaces Printing the push button status on the display block}}{89}\protected@file@percent } -\newlabel{52@xvr}{{}{89}} -\newlabel{52@vr}{{}{89}} -\newlabel{fig:push-button-status}{{5.3}{89}} -\@writefile{lot}{\contentsline {table}{\numberline {5.1}{\ignorespaces Parameters to print the push button status on the display block\relax }}{89}\protected@file@percent } -\newlabel{tab:push-button-status}{{5.1}{89}} -\newlabel{53@xvr}{{}{89}} -\newlabel{53@vr}{{}{89}} -\@writefile{lof}{\contentsline {figure}{\numberline {5.4}{\ignorespaces Turning the LED on or off, depending on the pushbutton}}{90}\protected@file@percent } -\newlabel{55@xvr}{{}{90}} -\newlabel{55@vr}{{}{90}} -\newlabel{fig:led-push-button}{{5.4}{90}} -\@writefile{lot}{\contentsline {table}{\numberline {5.2}{\ignorespaces Xcos parameters to turn the LED on through the pushbutton\relax }}{90}\protected@file@percent } -\newlabel{tab:led-push-button}{{5.2}{90}} -\newlabel{56@xvr}{{}{90}} -\newlabel{56@vr}{{}{90}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{5.{2}}{}}{89}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{89}\protected@file@percent } +\newlabel{50@xvr}{{}{89}} +\newlabel{50@vr}{{}{89}} +\newlabel{sci:push-200}{{5.{2}}{89}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led\textendash push\textendash button.sce}{89}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {5.5}Accessing the Pushbutton from Xcos}{89}\protected@file@percent } +\newlabel{sec:push-xcos}{{5.5}{89}} +\@writefile{lof}{\contentsline {figure}{\numberline {5.4}{\ignorespaces Printing the push button status on the display block}}{90}\protected@file@percent } +\newlabel{52@xvr}{{}{90}} +\newlabel{52@vr}{{}{90}} +\newlabel{fig:push-button-status}{{5.4}{90}} +\@writefile{lot}{\contentsline {table}{\numberline {5.1}{\ignorespaces Parameters to print the push button status on the display block\relax }}{90}\protected@file@percent } +\newlabel{tab:push-button-status}{{5.1}{90}} +\newlabel{53@xvr}{{}{90}} +\newlabel{53@vr}{{}{90}} \@writefile{thm}{\contentsline {egmass}{{Exercise}{5.{1}}{}}{90}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {5.6}Reading the Pushbutton Status from Python}{91}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.6.1}Reading the Pushbutton Status}{91}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push\textendash button\textendash status.py}{91}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push\textendash button\textendash status.py}{91}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led\textendash push\textendash button.py}{91}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {5.5}{\ignorespaces Turning the LED on or off, depending on the pushbutton}}{91}\protected@file@percent } +\newlabel{55@xvr}{{}{91}} +\newlabel{55@vr}{{}{91}} +\newlabel{fig:led-push-button}{{5.5}{91}} +\@writefile{lot}{\contentsline {table}{\numberline {5.2}{\ignorespaces Xcos parameters to turn the LED on through the pushbutton\relax }}{91}\protected@file@percent } +\newlabel{tab:led-push-button}{{5.2}{91}} +\newlabel{56@xvr}{{}{91}} +\newlabel{56@vr}{{}{91}} +\@writefile{toc}{\contentsline {section}{\numberline {5.6}Reading the Pushbutton Status from Python}{92}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.6.1}Reading the Pushbutton Status}{92}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push\textendash button\textendash status.py}{92}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push\textendash button\textendash status.py}{92}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led\textendash push\textendash button.py}{92}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {5.6.2}Python Code}{92}\protected@file@percent } \newlabel{sec:push-python-code}{{5.6.2}{92}} \@writefile{pyd}{\addvspace {10pt}} @@ -555,49 +557,49 @@ \newlabel{57@vr}{{}{92}} \newlabel{py:push-100}{{5.{1}}{92}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push\textendash button\textendash status.py}{92}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{5.{2}}{}}{92}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{92}\protected@file@percent } -\newlabel{58@xvr}{{}{92}} -\newlabel{58@vr}{{}{92}} -\newlabel{py:push-200}{{5.{2}}{92}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{5.{2}}{}}{93}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{93}\protected@file@percent } +\newlabel{58@xvr}{{}{93}} +\newlabel{58@vr}{{}{93}} +\newlabel{py:push-200}{{5.{2}}{93}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led\textendash push\textendash button.py}{93}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {5.7}Reading the Pushbutton Status from Julia}{94}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {5.7.1}Reading the Pushbutton Status}{94}\protected@file@percent } \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push\textendash button\textendash status.jl}{94}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led\textendash push\textendash button.jl}{94}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.7.2}Julia Code}{94}\protected@file@percent } -\newlabel{sec:push-julia-code}{{5.7.2}{94}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led\textendash push\textendash button.jl}{95}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.7.2}Julia Code}{95}\protected@file@percent } +\newlabel{sec:push-julia-code}{{5.7.2}{95}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{5.{1}}{}}{94}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{94}\protected@file@percent } -\newlabel{59@xvr}{{}{94}} -\newlabel{59@vr}{{}{94}} -\newlabel{julia:push-100}{{5.{1}}{94}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push\textendash button\textendash status.jl}{94}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{5.{1}}{}}{95}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{95}\protected@file@percent } +\newlabel{59@xvr}{{}{95}} +\newlabel{59@vr}{{}{95}} +\newlabel{julia:push-100}{{5.{1}}{95}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push\textendash button\textendash status.jl}{95}\protected@file@percent } \@writefile{thm}{\contentsline {juliamass}{{Julia Code}{5.{2}}{}}{95}\protected@file@percent } \@writefile{juliad}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{95}\protected@file@percent } \newlabel{60@xvr}{{}{95}} \newlabel{60@vr}{{}{95}} \newlabel{julia:push-200}{{5.{2}}{95}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led\textendash push\textendash button.jl}{95}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {5.8}Reading the Pushbutton Status from OpenModelica}{95}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.8.1}Reading the Pushbutton Status}{95}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push\textendash button\textendash status.mo}{95}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {5.8.2}OpenModelica Code}{95}\protected@file@percent } -\newlabel{sec:led-OpenModelica-code}{{5.8.2}{95}} +\@writefile{toc}{\contentsline {section}{\numberline {5.8}Reading the Pushbutton Status from OpenModelica}{96}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.8.1}Reading the Pushbutton Status}{96}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push\textendash button\textendash status.mo}{96}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {5.8.2}OpenModelica Code}{96}\protected@file@percent } +\newlabel{sec:led-OpenModelica-code}{{5.8.2}{96}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{1}}{}}{95}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{95}\protected@file@percent } -\newlabel{61@xvr}{{}{95}} -\newlabel{61@vr}{{}{95}} -\newlabel{OpenModelica:push-100}{{5.{1}}{95}} +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{1}}{}}{96}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{96}\protected@file@percent } +\newlabel{61@xvr}{{}{96}} +\newlabel{61@vr}{{}{96}} +\newlabel{OpenModelica:push-100}{{5.{1}}{96}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push\textendash button\textendash status.mo}{96}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{2}}{}}{96}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{96}\protected@file@percent } -\newlabel{62@xvr}{{}{96}} -\newlabel{62@vr}{{}{96}} -\newlabel{OpenModelica:push-200}{{5.{2}}{96}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led\textendash push\textendash button.mo}{96}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{2}}{}}{97}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{97}\protected@file@percent } +\newlabel{62@xvr}{{}{97}} +\newlabel{62@vr}{{}{97}} +\newlabel{OpenModelica:push-200}{{5.{2}}{97}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led\textendash push\textendash button.mo}{97}\protected@file@percent } \@writefile{toc}{\contentsline {chapter}{\numberline {6}Interfacing a Light Dependent Resistor}{99}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} diff --git a/floss-arduino.cod b/floss-arduino.cod index 7885efd..d5d43ff 100644 --- a/floss-arduino.cod +++ b/floss-arduino.cod @@ -9,7 +9,7 @@ \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{64}% \addvspace {10pt} \contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{88}% -\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{88}% +\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{89}% \addvspace {10pt} \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{104}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{105}% diff --git a/floss-arduino.fdb_latexmk b/floss-arduino.fdb_latexmk index 54f1e1e..f8b91d9 100644 --- a/floss-arduino.fdb_latexmk +++ b/floss-arduino.fdb_latexmk @@ -1,19 +1,19 @@ # Fdb version 3 -["bibtex floss-arduino"] 1617877001 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1617877063 +["bibtex floss-arduino"] 1617884099 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1617884536 "/usr/share/texlive/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 "" "bibliography.bib" 1617386964 3464 0dc80d81f59d2ac319f124d77ae8c1cd "" - "floss-arduino.aux" 1617877007 125914 f81bcc6e7e8c05fb4cc1543ee1e11202 "pdflatex" + "floss-arduino.aux" 1617884474 126130 cda1cd84405d893717dc3f6aaef15ecf "pdflatex" (generated) - "floss-arduino.bbl" "floss-arduino.blg" -["makeindex floss-arduino.idx"] 1617876994 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1617877063 - "floss-arduino.idx" 1617877007 187 a05eb1b6d87503e1c74f523dca5a4bf3 "pdflatex" + "floss-arduino.bbl" +["makeindex floss-arduino.idx"] 1617876994 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1617884536 + "floss-arduino.idx" 1617884474 187 a05eb1b6d87503e1c74f523dca5a4bf3 "pdflatex" (generated) "floss-arduino.ind" "floss-arduino.ilg" -["pdflatex"] 1617877001 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1617877063 +["pdflatex"] 1617884468 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1617884536 "/etc/texmf/web2c/texmf.cnf" 1602253014 475 c0e671620eb5563b2130f56340a5fde8 "" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1617877007 125914 f81bcc6e7e8c05fb4cc1543ee1e11202 "" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1617884474 126130 cda1cd84405d893717dc3f6aaef15ecf "" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" 1616757903 4558 ca761944339060a19cdb71de5337b126 "" "/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 "" @@ -139,18 +139,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" 1617877007 2297 17ed7271e546be968410679ec4a1d1da "pdflatex" - "floss-arduino.ard" 1617877007 2082 99fe0f2e661512111cf1ff3911fa158f "pdflatex" - "floss-arduino.aux" 1617877007 125914 f81bcc6e7e8c05fb4cc1543ee1e11202 "pdflatex" - "floss-arduino.bbl" 1617877001 2243 ecd6e796a77fc4300039804f4c573e56 "bibtex floss-arduino" - "floss-arduino.cod" 1617877007 2525 a342c9799fff11ffcc0c1d064bbebeb4 "pdflatex" + "floss-arduino.OpenModelicad" 1617884474 2297 9dcc6602caea8e66e8d793385673cc99 "pdflatex" + "floss-arduino.ard" 1617884474 2082 d28286c4c22aaba242b3fee8d82216cc "pdflatex" + "floss-arduino.aux" 1617884474 126130 cda1cd84405d893717dc3f6aaef15ecf "pdflatex" + "floss-arduino.bbl" 1617884099 2243 ecd6e796a77fc4300039804f4c573e56 "bibtex floss-arduino" + "floss-arduino.cod" 1617884474 2525 108706acf97d8fc60436aab2d7f30389 "pdflatex" "floss-arduino.ind" 1617876994 228 2e39d66b2fe4cf9dd81c4528bf2ab0f3 "makeindex floss-arduino.idx" - "floss-arduino.juliad" 1617877007 2311 51cee6b0189664750a576b68b249cac6 "pdflatex" - "floss-arduino.lof" 1617877007 11433 fa95e6fece5de271dce3c86d9d394831 "pdflatex" - "floss-arduino.lot" 1617877007 3700 defcc24628b4bdce7eac5bd9c654fb36 "pdflatex" - "floss-arduino.pyd" 1617877007 2323 c2a6277eb95343f8c438eed06faae7cc "pdflatex" + "floss-arduino.juliad" 1617884474 2311 bd31b933cfed8ab31bf4db814a060324 "pdflatex" + "floss-arduino.lof" 1617884474 11576 bdd179bad55e524b4665193507d57d74 "pdflatex" + "floss-arduino.lot" 1617884474 3700 c987c1c772f1961cd9c91f6baab7322b "pdflatex" + "floss-arduino.pyd" 1617884474 2323 96305cdb4c2c55fda0a8db4c436826bf "pdflatex" "floss-arduino.tex" 1616757903 4558 ca761944339060a19cdb71de5337b126 "" - "floss-arduino.toc" 1617877007 15103 cde10e82503ebff23c5439e1d5473eb8 "pdflatex" + "floss-arduino.toc" 1617884474 15103 fc79af3d667ff9e6c1f70ba62d4eff83 "pdflatex" "suppl/acr.tex" 1615963613 1926 fd6481c4666ee0d60331b7d4cc24b645 "" "suppl/intro.tex" 1615963613 3437 b09628cf9e20fe17fa65b37a5997653c "" "suppl/styles.tex" 1615963613 8143 aa3280f0b59c8631fe8ec44895c9e871 "" @@ -286,13 +286,14 @@ "user-code/push/OpenModelica/push-button-status.mo" 1615963614 1251 e670acf0e61d3855657d0d08598f967f "" "user-code/push/arduino/led-push-button/led-push-button.ino" 1615963614 396 f2cd654545d812fcf8dc360a261677ab "" "user-code/push/arduino/push-button-status/push-button-status.ino" 1615972043 376 77c53b136c9f6a2227e8e0c615b59677 "" - "user-code/push/figures/ard-pushbtn.png" 1615971132 89079 f6141d8798851ec1c53177a8bc966105 "" "user-code/push/figures/led-push-button.PNG" 1615963614 29100 9fb97725008a4f858830924290bafd86 "" "user-code/push/figures/push-button-status.PNG" 1615963614 27403 da6c41bb605a3801512422bfefcaf4ea "" "user-code/push/figures/pushbutton-conn.png" 1615963614 25321 c2e109dc82f76507b9a0b5f6e09be7db "" + "user-code/push/figures/switch-led.png" 1617880501 240149 ad9fa2cc65d176482fbdf38c633d826f "" + "user-code/push/figures/switch.png" 1617880485 220988 2689323a6f7a00d63e81ef7abb52961a "" "user-code/push/julia/led-push-button.jl" 1615963614 244 bdd35ebaf7a49131c86afec8f4d652d5 "" "user-code/push/julia/push-button-status.jl" 1615963614 162 c571ce3005e5ec597e7dcda1b849185a "" - "user-code/push/push.tex" 1615974705 21438 49ce61245049fdd6bff38a0f761b01e6 "" + "user-code/push/push.tex" 1617884536 22889 3e7c59abdca09fff3b079c0475f0b970 "" "user-code/push/python/led-push-button.py" 1615963614 840 4bb8db9727a8e8653a21fbbc7b7526d7 "" "user-code/push/python/push-button-status.py" 1615963614 722 f58f02f7b8f3f6ec8ed84f102fba6df1 "" "user-code/push/scilab/led-push-button.sce" 1615963614 343 cf0876406ea3698e7f8fabac2dd17128 "" @@ -374,18 +375,18 @@ "user-code/thermistor/scilab/therm-read.sce" 1615963614 382 5e743c25b50f9d961a2939ce81d7b633 "" "user-code/thermistor/thermistor.tex" 1615974011 24283 566b640d2c28a0d62ba94f5644269a22 "" (generated) - "floss-arduino.idx" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" - "floss-arduino.log" - "floss-arduino.ard" + "floss-arduino.toc" "floss-arduino.aux" - "floss-arduino.thm" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" + "floss-arduino.pdf" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" - "floss-arduino.pyd" - "floss-arduino.OpenModelicad" + "floss-arduino.ard" "floss-arduino.cod" "floss-arduino.lot" - "floss-arduino.juliad" - "floss-arduino.pdf" + "floss-arduino.idx" + "floss-arduino.OpenModelicad" "floss-arduino.lof" - "floss-arduino.toc" + "floss-arduino.thm" + "floss-arduino.juliad" + "floss-arduino.log" + "floss-arduino.pyd" diff --git a/floss-arduino.fls b/floss-arduino.fls index d4a69a3..79b2cc0 100644 --- a/floss-arduino.fls +++ b/floss-arduino.fls @@ -472,9 +472,12 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/push.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/ard-pushbtn.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/ard-pushbtn.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/ard-pushbtn.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino diff --git a/floss-arduino.juliad b/floss-arduino.juliad index a4860df..8d577a8 100644 --- a/floss-arduino.juliad +++ b/floss-arduino.juliad @@ -5,7 +5,7 @@ \contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{77}% \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{77}% \addvspace {10pt} -\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{94}% +\contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{95}% \contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{95}% \addvspace {10pt} \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{112}% diff --git a/floss-arduino.lof b/floss-arduino.lof index 18e4f29..6aa281b 100644 --- a/floss-arduino.lof +++ b/floss-arduino.lof @@ -59,9 +59,10 @@ \contentsline {figure}{\numberline {4.9}{\ignorespaces Blinking the green LED every second through Xcos}}{68}% \addvspace {10\p@ } \contentsline {figure}{\numberline {5.1}{\ignorespaces Connection Diagram\relax }}{84}% -\contentsline {figure}{\numberline {5.2}{\ignorespaces Interfacing a pushbutton with Arduino Uno using a breadboard\relax }}{85}% -\contentsline {figure}{\numberline {5.3}{\ignorespaces Printing the push button status on the display block}}{89}% -\contentsline {figure}{\numberline {5.4}{\ignorespaces Turning the LED on or off, depending on the pushbutton}}{90}% +\contentsline {figure}{\numberline {5.2}{\ignorespaces A pushbutton to read its status with Arduino Uno using a breadboard\relax }}{84}% +\contentsline {figure}{\numberline {5.3}{\ignorespaces A pushbutton to control an LED with Arduino Uno using a breadboard\relax }}{85}% +\contentsline {figure}{\numberline {5.4}{\ignorespaces Printing the push button status on the display block}}{90}% +\contentsline {figure}{\numberline {5.5}{\ignorespaces Turning the LED on or off, depending on the pushbutton}}{91}% \addvspace {10\p@ } \contentsline {figure}{\numberline {6.1}{\ignorespaces Light Dependent Resistor\relax }}{100}% \contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Pictorial representation of an LDR}}}{100}% diff --git a/floss-arduino.log b/floss-arduino.log index c2c5a3e..b5a015b 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) 8 APR 2021 15:48 +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 8 APR 2021 17:52 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -537,7 +537,7 @@ Overfull \hbox (42.2769pt too wide) detected at line 204 [6] (./floss-arduino.lof [7 ] [8] -Overfull \hbox (4.98741pt too wide) in paragraph at lines 84--84 +Overfull \hbox (4.98741pt too wide) in paragraph at lines 85--85 [][] []\T1/cmr/m/n/10.95 Turning LEDs on through Xcos de-pend-ing on the po-te n-tiome-ter thresh- [] @@ -1424,44 +1424,60 @@ n-conn.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu sh/figures/pushbutton-conn.png used on input line 63. (pdftex.def) Requested size: 178.86702pt x 188.80507pt. -[83] - -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/ard-push -btn.png Graphic file (type png) - + +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.p +ng Graphic file (type png) + Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu -sh/figures/ard-pushbtn.png used on input line 81. -(pdftex.def) Requested size: 397.48499pt x 248.20805pt. +sh/figures/switch.png used on input line 72. +(pdftex.def) Requested size: 397.48499pt x 209.64827pt. +[83] +Underfull \vbox (badness 3098) has occurred while \output is active [] + [84 ] +on-conn.png> ] + +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-l +ed.png Graphic file (type png) + +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/switch-led.png used on input line 103. +(pdftex.def) Requested size: 397.48499pt x 233.56786pt. + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [85 ] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s tatus/push-button-status.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s -tatus/push-button-status.ino) [85 ] +tatus/push-button-status.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-butt -on/led-push-button.ino) +on/led-push-button.ino) [86] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s tatus/push-button-status.ino) -Overfull \hbox (0.16989pt too wide) in paragraph at lines 145--148 +Overfull \hbox (0.16989pt too wide) in paragraph at lines 171--174 []\T1/cmr/m/n/10.95 Turning the LED on or off de-pend-ing on the push-but-ton. Avail- [] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-butt -on/led-push-button.ino [86]) +on/led-push-button.ino) [87] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st atus.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st atus.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-butto -n.sce) [87] +n.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st -atus.sce) -Overfull \hbox (0.145pt too wide) in paragraph at lines 198--201 +atus.sce [88]) +Overfull \hbox (0.145pt too wide) in paragraph at lines 224--227 \T1/cmr/m/n/10.95 able at \T1/fvm/m/n/10.95 O r i g i n / u s e r - c o d e / p u s h / s c i l a b / l e d - p u s h - b u t t o n . s c e\T1/cmr/m/n/10.95 , see Foot- @@ -1471,69 +1487,64 @@ Overfull \hbox (0.145pt too wide) in paragraph at lines 198--201 (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-butto n.sce) +tatus.PNG, id=473, 264.99pt x 268.00125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-but ton-status.PNG Graphic file (type png) Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu -sh/figures/push-button-status.PNG used on input line 229. +sh/figures/push-button-status.PNG used on input line 255. (pdftex.def) Requested size: 178.86702pt x 180.9012pt. -Overfull \hbox (3.33746pt too wide) in paragraph at lines 247--257 +Overfull \hbox (3.33746pt too wide) in paragraph at lines 273--283 [][] [] -[88] [89 ] +[89] +on.PNG, id=477, 298.86656pt x 264.99pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push -button.PNG Graphic file (type png) Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu -sh/figures/led-push-button.PNG used on input line 272. +sh/figures/led-push-button.PNG used on input line 298. (pdftex.def) Requested size: 178.86702pt x 158.59492pt. -Overfull \hbox (4.77844pt too wide) in paragraph at lines 289--300 +Overfull \hbox (4.77844pt too wide) in paragraph at lines 315--326 [][] [] -[90 ] +[90 ] [91 ] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st atus.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st atus.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-butto -n.py) [91] +n.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st -atus.py) +atus.py [92]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-butto -n.py [92]) -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [93] +n.py [93]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-sta -tus.jl) +tus.jl) [94] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button .jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-sta -tus.jl) [94] +tus.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button -.jl) +.jl [95]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-but ton-status.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-but -ton-status.mo [95]) +ton-status.mo [96]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led-push --button.mo [96])) (./user-code/ldr/ldr.tex [97] [98 - -] +-button.mo [97])) (./user-code/ldr/ldr.tex [98] Chapter 6. +9, 106.89937pt x 94.85437pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg G raphic file (type jpg) @@ -1541,7 +1552,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld r/figures/ldr.jpg used on input line 62. (pdftex.def) Requested size: 178.86702pt x 158.72462pt. +d=510, 1009.52156pt x 741.52031pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.p ng Graphic file (type png) +id=511, 415.5525pt x 450.68375pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn. png Graphic file (type png) Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld r/figures/ldr-conn.png used on input line 71. (pdftex.def) Requested size: 178.86702pt x 193.98965pt. -[99] +[99 + +] Overfull \hbox (0.60098pt too wide) in paragraph at lines 87--87 []\T1/cmr/bx/n/14.4 Connecting an LDR with Ar-duino Uno us-ing a bread- [] @@ -1570,7 +1583,7 @@ Underfull \vbox (badness 3333) has occurred while \output is active [] ] +d=520, 1086.0575pt x 601.24625pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ard-ldr.p ng Graphic file (type png) +PNG, id=535, 257.46187pt x 304.13625pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read- xcos.PNG Graphic file (type png) +d=539, 769.87625pt x 640.3925pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.p ng Graphic file (type png) +ard.png, id=570, 247.92625pt x 232.87pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or_board.png Graphic file (type png) +png, id=575, 415.5525pt x 467.7475pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem atic.png Graphic file (type png) +escription.jpg, id=576, 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) +ock.png, id=605, 275.52937pt x 290.58563pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-clock.png Graphic file (type png) ] +th.png, id=610, 292.09125pt x 322.95656pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-both.png Graphic file (type png) +op.png, id=611, 281.55188pt x 307.90031pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot or-loop.png Graphic file (type png) +id=652, 1576.38937pt x 1305.37688pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter. png Graphic file (type png) + id=653, 415.5525pt x 417.56pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic .png Graphic file (type png) +PNG, id=669, 548.80031pt x 493.845pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-thres hold.PNG Graphic file (type png) +d.jpg, id=696, 139.9629pt x 126.2316pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NT C-bead.jpg Graphic file (type jpg) +ym.png, id=697, 1284.8pt x 913.4125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-sym.png Graphic file (type png) +TOR-Diagram-crop.pdf, id=698, 329.23pt x 422.57875pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/TH ERMISTOR-Diagram-crop.pdf Graphic file (type pdf) +Diagram-crop.pdf, id=699, 307.1475pt x 366.36874pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BU ZZER-Diagram-crop.pdf Graphic file (type pdf) ] +rm.png, id=719, 1083.04625pt x 550.055pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/ar d-therm.png Graphic file (type png) +ead-xcos.png, id=739, 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) +ead.png, id=740, 632.3625pt x 529.98pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-read.png Graphic file (type png) ] +uzzer-xcos.png, id=745, 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) ] +uzzer.png, id=751, 612.2875pt x 589.20125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th erm-buzzer.png Graphic file (type png) +ng, id=805, 265.74281pt x 309.40594pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-i nit.png Graphic file (type png) +e.png, id=809, 244.66406pt x 281.55188pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r everse.png Graphic file (type png) ] +ng, id=813, 281.55188pt x 347.04657pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l oop.png Graphic file (type png) +g, id=814, 286.06876pt x 292.09125pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-p ot.png Graphic file (type png) +d=869, 672.5125pt x 224.84pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.p ng Graphic file (type png) +d=870, 360.34625pt x 375.4025pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.p ng Graphic file (type png) +d=871, 481.04718pt x 214.55156pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.p ng Graphic file (type png) ] [193 ] [194] [195] +.png, id=886, 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) +am.PNG, id=890, 398.23781pt x 255.95625pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- diagram.PNG Graphic file (type png) +e_flowchart.png, id=891, 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) ] +ng, id=896, 482.55281pt x 362.10281pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch art.png Graphic file (type png) +put.png, id=897, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren t-output.png Graphic file (type png) +put-setup.jpg, id=898, 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) +put.png, id=899, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag e-output.png Graphic file (type png) +put-setup.jpg, id=900, 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) +r-output.png, id=901, 1028.34187pt x 578.16pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active -power-output.png Graphic file (type png) ] +r-output-setup.jpg, id=906, 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) ] +xcos.png, id=912, 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) -Output written on floss-arduino.pdf (236 pages, 23762952 bytes). +Output written on floss-arduino.pdf (236 pages, 24013512 bytes). PDF statistics: - 1051 PDF objects out of 1200 (max. 8388607) + 1053 PDF objects out of 1200 (max. 8388607) 623 compressed objects within 7 object streams 0 named destinations out of 1000 (max. 500000) - 506 words of extra memory for PDF output out of 10000 (max. 10000000) + 511 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/floss-arduino.lot b/floss-arduino.lot index 573a0fe..65a2d2e 100644 --- a/floss-arduino.lot +++ b/floss-arduino.lot @@ -10,8 +10,8 @@ \contentsline {table}{\numberline {4.3}{\ignorespaces Parameters to turn the blue and red LEDs on and then turn them off one by one\relax }}{68}% \contentsline {table}{\numberline {4.4}{\ignorespaces Parameters to make the green LED blink every second\relax }}{69}% \addvspace {10\p@ } -\contentsline {table}{\numberline {5.1}{\ignorespaces Parameters to print the push button status on the display block\relax }}{89}% -\contentsline {table}{\numberline {5.2}{\ignorespaces Xcos parameters to turn the LED on through the pushbutton\relax }}{90}% +\contentsline {table}{\numberline {5.1}{\ignorespaces Parameters to print the push button status on the display block\relax }}{90}% +\contentsline {table}{\numberline {5.2}{\ignorespaces Xcos parameters to turn the LED on through the pushbutton\relax }}{91}% \addvspace {10\p@ } \contentsline {table}{\numberline {6.1}{\ignorespaces Xcos parameters to read LDR\relax }}{106}% \contentsline {table}{\numberline {6.2}{\ignorespaces Xcos parameters to read LDR and regulate blue LED\relax }}{108}% diff --git a/floss-arduino.pdf b/floss-arduino.pdf index 0798e74..2ae1f51 100644 Binary files a/floss-arduino.pdf and b/floss-arduino.pdf differ diff --git a/floss-arduino.pyd b/floss-arduino.pyd index 9a37ba1..17858cb 100644 --- a/floss-arduino.pyd +++ b/floss-arduino.pyd @@ -7,7 +7,7 @@ \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{74}% \addvspace {10pt} \contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{92}% -\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{92}% +\contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{93}% \addvspace {10pt} \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{109}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{110}% diff --git a/floss-arduino.thm b/floss-arduino.thm index e41c9a8..5751f80 100644 --- a/floss-arduino.thm +++ b/floss-arduino.thm @@ -26,17 +26,17 @@ \contentsline {OpenModelicamass}{{OpenModelica Code}{4.{2}}{}}{79}% \contentsline {OpenModelicamass}{{OpenModelica Code}{4.{3}}{}}{80}% \contentsline {OpenModelicamass}{{OpenModelica Code}{4.{4}}{}}{81}% -\contentsline {ardmass}{{Arduino Code}{5.{1}}{}}{86}% -\contentsline {ardmass}{{Arduino Code}{5.{2}}{}}{86}% +\contentsline {ardmass}{{Arduino Code}{5.{1}}{}}{87}% +\contentsline {ardmass}{{Arduino Code}{5.{2}}{}}{87}% \contentsline {codemass}{{Scilab Code}{5.{1}}{}}{88}% -\contentsline {codemass}{{Scilab Code}{5.{2}}{}}{88}% +\contentsline {codemass}{{Scilab Code}{5.{2}}{}}{89}% \contentsline {egmass}{{Exercise}{5.{1}}{}}{90}% \contentsline {pymass}{{Python Code}{5.{1}}{}}{92}% -\contentsline {pymass}{{Python Code}{5.{2}}{}}{92}% -\contentsline {juliamass}{{Julia Code}{5.{1}}{}}{94}% +\contentsline {pymass}{{Python Code}{5.{2}}{}}{93}% +\contentsline {juliamass}{{Julia Code}{5.{1}}{}}{95}% \contentsline {juliamass}{{Julia Code}{5.{2}}{}}{95}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{1}}{}}{95}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{2}}{}}{96}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{1}}{}}{96}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{5.{2}}{}}{97}% \contentsline {egmass}{{Exercise}{6.{1}}{}}{102}% \contentsline {ardmass}{{Arduino Code}{6.{1}}{}}{103}% \contentsline {ardmass}{{Arduino Code}{6.{2}}{}}{103}% diff --git a/floss-arduino.toc b/floss-arduino.toc index d395357..0443f0e 100644 --- a/floss-arduino.toc +++ b/floss-arduino.toc @@ -77,22 +77,22 @@ \contentsline {chapter}{\numberline {5}Interfacing a Pushbutton}{83}% \contentsline {section}{\numberline {5.1}Preliminaries}{83}% \contentsline {section}{\numberline {5.2}Connecting a pushbutton with Arduino Uno\ using a breadboard}{83}% -\contentsline {section}{\numberline {5.3}Reading the Pushbutton Status from the Arduino IDE}{84}% -\contentsline {subsection}{\numberline {5.3.1}Reading the Pushbutton Status}{84}% -\contentsline {subsection}{\numberline {5.3.2}Arduino Code}{86}% -\contentsline {section}{\numberline {5.4}Reading the Pushbutton Status from Scilab}{87}% -\contentsline {subsection}{\numberline {5.4.1}Reading the Pushbutton Status}{87}% +\contentsline {section}{\numberline {5.3}Reading the Pushbutton Status from the Arduino IDE}{86}% +\contentsline {subsection}{\numberline {5.3.1}Reading the Pushbutton Status}{86}% +\contentsline {subsection}{\numberline {5.3.2}Arduino Code}{87}% +\contentsline {section}{\numberline {5.4}Reading the Pushbutton Status from Scilab}{88}% +\contentsline {subsection}{\numberline {5.4.1}Reading the Pushbutton Status}{88}% \contentsline {subsection}{\numberline {5.4.2}Scilab Code}{88}% -\contentsline {section}{\numberline {5.5}Accessing the Pushbutton from Xcos}{88}% -\contentsline {section}{\numberline {5.6}Reading the Pushbutton Status from Python}{91}% -\contentsline {subsection}{\numberline {5.6.1}Reading the Pushbutton Status}{91}% +\contentsline {section}{\numberline {5.5}Accessing the Pushbutton from Xcos}{89}% +\contentsline {section}{\numberline {5.6}Reading the Pushbutton Status from Python}{92}% +\contentsline {subsection}{\numberline {5.6.1}Reading the Pushbutton Status}{92}% \contentsline {subsection}{\numberline {5.6.2}Python Code}{92}% \contentsline {section}{\numberline {5.7}Reading the Pushbutton Status from Julia}{94}% \contentsline {subsection}{\numberline {5.7.1}Reading the Pushbutton Status}{94}% -\contentsline {subsection}{\numberline {5.7.2}Julia Code}{94}% -\contentsline {section}{\numberline {5.8}Reading the Pushbutton Status from OpenModelica}{95}% -\contentsline {subsection}{\numberline {5.8.1}Reading the Pushbutton Status}{95}% -\contentsline {subsection}{\numberline {5.8.2}OpenModelica Code}{95}% +\contentsline {subsection}{\numberline {5.7.2}Julia Code}{95}% +\contentsline {section}{\numberline {5.8}Reading the Pushbutton Status from OpenModelica}{96}% +\contentsline {subsection}{\numberline {5.8.1}Reading the Pushbutton Status}{96}% +\contentsline {subsection}{\numberline {5.8.2}OpenModelica Code}{96}% \contentsline {chapter}{\numberline {6}Interfacing a Light Dependent Resistor}{99}% \contentsline {section}{\numberline {6.1}Preliminaries}{99}% \contentsline {section}{\numberline {6.2}Connecting an LDR with Arduino Uno\ using a breadboard}{101}% diff --git a/indent.log b/indent.log new file mode 100644 index 0000000..fde8040 --- /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/ + Thu Apr 8 17:37:04 2021 + Filename: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/__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/push/figures/ard-pushbtn.png b/user-code/push/figures/ard-pushbtn.png deleted file mode 100644 index 6d481c2..0000000 Binary files a/user-code/push/figures/ard-pushbtn.png and /dev/null differ diff --git a/user-code/push/figures/switch-led.png b/user-code/push/figures/switch-led.png new file mode 100644 index 0000000..437e280 Binary files /dev/null and b/user-code/push/figures/switch-led.png differ diff --git a/user-code/push/figures/switch.png b/user-code/push/figures/switch.png new file mode 100644 index 0000000..55309c8 Binary files /dev/null and b/user-code/push/figures/switch.png differ diff --git a/user-code/push/push.tex b/user-code/push/push.tex index 99b3424..45bce9b 100644 --- a/user-code/push/push.tex +++ b/user-code/push/push.tex @@ -66,23 +66,49 @@ is provided by the manufacturer in the datasheet. \label{fig:pushbuttonconn} \end{figure} + +\begin{figure} + \centering + \includegraphics[width=\textwidth]{\LocPushfig/switch.png} + \caption{A pushbutton to read its status with Arduino Uno using a breadboard} + %\redcolor{connected on pin no. D12}} + \label{fig:switch-bread} +\end{figure} + \section{Connecting a pushbutton 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.  -To know more about the pushbutton, one should watch the Spoken Tutorials on Arduino as published on - {\tt https://spoken-tutorial.org/}. In case, you have a pushbutton and you want to try connecting it with \arduino\ on a breadboard, you should -refer to the sixth tutorial titled Arduino with Tricolor LED and Push button on {\tt https://spoken-tutorial.org/}. -To know the connections, please refer to the figure \ref{fig:ard-pushbtn-bread}. The connections given in this -figure can be used to read the status of a pushbutton. +To know more about a pushbutton, one should watch the Spoken Tutorials on Arduino as published on + {\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. + +In case you have a pushbutton, and you want to connect it with \arduino\ on a breadboard, +please refer to \figref{fig:switch-bread}. The connections given in this figure can be used to +read the status of a pushbutton. As shown in \figref{fig:switch-bread}, +there are three different wires - red, black, and blue. The red wire is used to connect 5V on +\arduino\ and one leg of the pushbutton. The black wire connects to one long vertical row on +the side of the breadboard to provide access to the ground (GND) on \arduino. +The blue wire goes from digital pin 12 to one leg of the pushbutton on another side. +That same leg of the pushbutton connects through a pull-down resistor to GND on \arduino. +When the pushbutton is open (unpressed), there is no connection between the two legs of the pushbutton, +so the pin is connected to the ground (through the pull-down resistor), and we read a LOW. +When the button is closed (pressed), it makes a connection between its two legs, +connecting the pin to 5V so that we read a HIGH. \begin{figure} \centering - \includegraphics[width=\textwidth]{\LocPushfig/ard-pushbtn.png} - \caption{Interfacing a pushbutton with Arduino Uno using a breadboard} + \includegraphics[width=\textwidth]{\LocPushfig/switch-led.png} + \caption{A pushbutton to control an LED with Arduino Uno using a breadboard} %\redcolor{connected on pin no. D12}} - \label{fig:ard-pushbtn-bread} + \label{fig:switch-led} \end{figure} +The connections shown in \figref{fig:switch-led} can be used to control an RGB LED, +depending on the status of the pushbutton. As shown in \figref{fig:switch-led}, digital +pin 9 on \arduino\ is connected to the rightmost leg of the RGB LED. Rest connections +are same as that in \figref{fig:switch-bread}. \section{Reading the Pushbutton Status from the Arduino IDE} \subsection{Reading the Pushbutton Status} -- cgit