diff options
author | SudhakarKuma | 2021-04-30 16:20:17 +0530 |
---|---|---|
committer | SudhakarKuma | 2021-04-30 16:20:17 +0530 |
commit | 60b2fa8ed8fed500b404645d4a0ec60334a71b5c (patch) | |
tree | e8c80e6e31e989a91f74c6979940ef4fa6783919 | |
parent | 274b5e966c1fb0863d60e863055d094deabda0c3 (diff) | |
download | FLOSS-Arduino-Book-60b2fa8ed8fed500b404645d4a0ec60334a71b5c.tar.gz FLOSS-Arduino-Book-60b2fa8ed8fed500b404645d4a0ec60334a71b5c.tar.bz2 FLOSS-Arduino-Book-60b2fa8ed8fed500b404645d4a0ec60334a71b5c.zip |
Add NM suggestions
-rw-r--r-- | floss-arduino.OpenModelicad | 4 | ||||
-rw-r--r-- | floss-arduino.aux | 24 | ||||
-rw-r--r-- | floss-arduino.cod | 2 | ||||
-rw-r--r-- | floss-arduino.fdb_latexmk | 62 | ||||
-rw-r--r-- | floss-arduino.log | 67 | ||||
-rw-r--r-- | floss-arduino.pdf | bin | 20895255 -> 20895849 bytes | |||
-rw-r--r-- | floss-arduino.thm | 8 | ||||
-rw-r--r-- | user-code/led/led.tex | 35 | ||||
-rw-r--r-- | user-code/push/arduino/led-push-button/led-push-button.ino | 4 | ||||
-rw-r--r-- | user-code/push/arduino/push-button-status/push-button-status.ino | 2 | ||||
-rw-r--r-- | user-code/push/push.tex | 21 |
11 files changed, 118 insertions, 111 deletions
diff --git a/floss-arduino.OpenModelicad b/floss-arduino.OpenModelicad index 5f04f4c..4c6f63f 100644 --- a/floss-arduino.OpenModelicad +++ b/floss-arduino.OpenModelicad @@ -1,9 +1,9 @@ \contentsline {section}{\numberline {3.{1}}An OpenModelica code to check whether the firmware is properly installed or not}{65}% \addvspace {10pt} -\contentsline {section}{\numberline {4.{1}}Turning on the blue LED}{90}% +\contentsline {section}{\numberline {4.{1}}Turning on the blue LED}{91}% \contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{91}% \contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{92}% -\contentsline {section}{\numberline {4.{4}}Blinking the green LED}{92}% +\contentsline {section}{\numberline {4.{4}}Blinking the green LED}{93}% \addvspace {10pt} \contentsline {section}{\numberline {5.{1}}Read the status of the pushbutton and displaying on the serial monitor}{108}% \contentsline {section}{\numberline {5.{2}}Turning the LED on or off depending on the pushbutton}{109}% diff --git a/floss-arduino.aux b/floss-arduino.aux index 44d2604..7e37cc9 100644 --- a/floss-arduino.aux +++ b/floss-arduino.aux @@ -370,11 +370,11 @@ \newlabel{21@vr}{{}{75}} \newlabel{sci:led-blue}{{4.{1}}{75}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led\textendash blue.sce}{75}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{4.{2}}{}}{75}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{75}\protected@file@percent } -\newlabel{22@xvr}{{}{75}} -\newlabel{22@vr}{{}{75}} -\newlabel{sci:led-blue-delay}{{4.{2}}{75}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{4.{2}}{}}{76}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{76}\protected@file@percent } +\newlabel{22@xvr}{{}{76}} +\newlabel{22@vr}{{}{76}} +\newlabel{sci:led-blue-delay}{{4.{2}}{76}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led\textendash blue\textendash delay.sce}{76}\protected@file@percent } \@writefile{thm}{\contentsline {codemass}{{Scilab Code}{4.{3}}{}}{76}\protected@file@percent } \@writefile{cod}{\contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{76}\protected@file@percent } @@ -414,7 +414,6 @@ \newlabel{tab:led-blue-red}{{4.3}{79}} \newlabel{33@xvr}{{}{79}} \newlabel{33@vr}{{}{79}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{4.{3}}{}}{79}\protected@file@percent } \@writefile{lof}{\contentsline {figure}{\numberline {4.9}{\ignorespaces Blinking the green LED every second through Xcos}}{80}\protected@file@percent } \newlabel{35@xvr}{{}{80}} \newlabel{35@vr}{{}{80}} @@ -423,6 +422,7 @@ \newlabel{tab:led-green-blink}{{4.4}{80}} \newlabel{36@xvr}{{}{80}} \newlabel{36@vr}{{}{80}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{4.{3}}{}}{80}\protected@file@percent } \citation{pySerial} \@writefile{toc}{\contentsline {section}{\numberline {4.6}Lighting the LED from Python}{81}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {4.6.1}Lighting the LED}{81}\protected@file@percent } @@ -512,9 +512,9 @@ \@writefile{toc}{\contentsline {subsection}{\numberline {4.8.2}OpenModelica Code}{90}\protected@file@percent } \newlabel{sec:led-OpenModelica-code}{{4.8.2}{90}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{1}}{}}{90}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{1}}Turning on the blue LED}{90}\protected@file@percent } -\newlabel{OpenModelica:led-blue}{{4.{1}}{90}} +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{1}}{}}{91}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{1}}Turning on the blue LED}{91}\protected@file@percent } +\newlabel{OpenModelica:led-blue}{{4.{1}}{91}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led\textendash blue.mo}{91}\protected@file@percent } \@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{2}}{}}{91}\protected@file@percent } \@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{91}\protected@file@percent } @@ -524,9 +524,9 @@ \@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{92}\protected@file@percent } \newlabel{OpenModelica:led-blue-red}{{4.{3}}{92}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led\textendash blue\textendash red.mo}{92}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{4}}{}}{92}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{4}}Blinking the green LED}{92}\protected@file@percent } -\newlabel{OpenModelica:led-green-blink}{{4.{4}}{92}} +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{4}}{}}{93}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {4.{4}}Blinking the green LED}{93}\protected@file@percent } +\newlabel{OpenModelica:led-green-blink}{{4.{4}}{93}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led\textendash green\textendash blink.mo}{93}\protected@file@percent } \@writefile{toc}{\contentsline {chapter}{\numberline {5}Interfacing a Pushbutton}{95}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} diff --git a/floss-arduino.cod b/floss-arduino.cod index e945a6e..4d3d15b 100644 --- a/floss-arduino.cod +++ b/floss-arduino.cod @@ -4,7 +4,7 @@ \addvspace {10pt} \addvspace {10pt} \contentsline {section}{\numberline {4.{1}}Turning on the blue LED}{75}% -\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{75}% +\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{76}% \contentsline {section}{\numberline {4.{3}}Turning on blue and red LEDs for 5 seconds and then turning them off one by one}{76}% \contentsline {section}{\numberline {4.{4}}Blinking the green LED}{76}% \addvspace {10pt} diff --git a/floss-arduino.fdb_latexmk b/floss-arduino.fdb_latexmk index 1d77173..860ae37 100644 --- a/floss-arduino.fdb_latexmk +++ b/floss-arduino.fdb_latexmk @@ -1,19 +1,19 @@ # Fdb version 3 -["bibtex floss-arduino"] 1619724076 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1619724134 +["bibtex floss-arduino"] 1619779744 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1619779769 "/usr/share/texlive/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 "" "bibliography.bib" 1619058609 4121 e0d02327e4bb995867623cd1f708046e "" - "floss-arduino.aux" 1619724085 133273 0f8f27d0b63c7d1b48a38f425181a943 "pdflatex" + "floss-arduino.aux" 1619779752 133273 2768349005a828d4ffc0719bc85bc337 "pdflatex" (generated) "floss-arduino.blg" "floss-arduino.bbl" -["makeindex floss-arduino.idx"] 1619723749 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1619724134 - "floss-arduino.idx" 1619724085 187 9374babcab6e650ef029e1d90c8aca3a "pdflatex" +["makeindex floss-arduino.idx"] 1619749188 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1619779769 + "floss-arduino.idx" 1619779752 187 9374babcab6e650ef029e1d90c8aca3a "pdflatex" (generated) "floss-arduino.ind" "floss-arduino.ilg" -["pdflatex"] 1619724076 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1619724134 +["pdflatex"] 1619779744 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1619779769 "/etc/texmf/web2c/texmf.cnf" 1602253014 475 c0e671620eb5563b2130f56340a5fde8 "" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1619724085 133273 0f8f27d0b63c7d1b48a38f425181a943 "" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1619779752 133273 2768349005a828d4ffc0719bc85bc337 "" "/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" 1619724085 2304 8fe1b67fd8b2298d7a3eda84eb8f0c43 "pdflatex" - "floss-arduino.ard" 1619724085 2082 af0344a36cf6a45a34513b17b6bef8a2 "pdflatex" - "floss-arduino.aux" 1619724085 133273 0f8f27d0b63c7d1b48a38f425181a943 "pdflatex" - "floss-arduino.bbl" 1619724076 2654 051fbb0ca9f90e7ce7d2577998098d98 "bibtex floss-arduino" - "floss-arduino.cod" 1619724085 2517 fa5aa18bbf0cb65eeaea21637fd5c1ee "pdflatex" - "floss-arduino.ind" 1619723749 228 3aecfe8fd246b3bf714259f6bf61b4ba "makeindex floss-arduino.idx" - "floss-arduino.juliad" 1619724085 2325 4ae7e45d32e1d98055be849fce04a9a3 "pdflatex" - "floss-arduino.lof" 1619724085 13046 217b151cf1f8ae7de9ef7e98b96f0084 "pdflatex" - "floss-arduino.lot" 1619724085 3702 6b9b8bff6c5c56dabaa23a4a8575df9d "pdflatex" - "floss-arduino.pyd" 1619724085 2317 50719cf939100cd0323a9fbfa69ae19f "pdflatex" + "floss-arduino.OpenModelicad" 1619779752 2304 6fc0f2d9a5bfe4d2f2f6e643e8c9efdb "pdflatex" + "floss-arduino.ard" 1619779752 2082 af0344a36cf6a45a34513b17b6bef8a2 "pdflatex" + "floss-arduino.aux" 1619779752 133273 2768349005a828d4ffc0719bc85bc337 "pdflatex" + "floss-arduino.bbl" 1619779744 2654 051fbb0ca9f90e7ce7d2577998098d98 "bibtex floss-arduino" + "floss-arduino.cod" 1619779752 2517 304179a2e3ebd76634980debaa37816e "pdflatex" + "floss-arduino.ind" 1619749188 228 3aecfe8fd246b3bf714259f6bf61b4ba "makeindex floss-arduino.idx" + "floss-arduino.juliad" 1619779752 2325 4ae7e45d32e1d98055be849fce04a9a3 "pdflatex" + "floss-arduino.lof" 1619779752 13046 217b151cf1f8ae7de9ef7e98b96f0084 "pdflatex" + "floss-arduino.lot" 1619779752 3702 6b9b8bff6c5c56dabaa23a4a8575df9d "pdflatex" + "floss-arduino.pyd" 1619779752 2317 50719cf939100cd0323a9fbfa69ae19f "pdflatex" "floss-arduino.tex" 1619403261 4558 99e8133d713ce68a01e2f2b59b0d6baf "" - "floss-arduino.toc" 1619724085 15539 e161ef70902e48975db6704b3b944dba "pdflatex" + "floss-arduino.toc" 1619779752 15539 e161ef70902e48975db6704b3b944dba "pdflatex" "suppl/acr.tex" 1615963613 1926 fd6481c4666ee0d60331b7d4cc24b645 "" "suppl/intro.tex" 1615963613 3437 b09628cf9e20fe17fa65b37a5997653c "" "suppl/styles.tex" 1615963613 8143 aa3280f0b59c8631fe8ec44895c9e871 "" @@ -236,7 +236,7 @@ "user-code/led/julia/led-blue-red.jl" 1617923932 320 02d5d14ebbd49cd33b25a9828492945c "" "user-code/led/julia/led-blue.jl" 1619662025 170 c9cc13e4fb6e898855537bb9e1f2a787 "" "user-code/led/julia/led-green-blink.jl" 1619663087 249 d785472e844af87c34e32322ccb211e2 "" - "user-code/led/led.tex" 1619724133 46960 04d55579e914a0be256a951de11dc736 "" + "user-code/led/led.tex" 1619779768 47356 be84fa6520b4b89444827d232822a061 "" "user-code/led/python/led-blue-delay.py" 1619660150 805 9c5bde89850fc3b25ced778dfafe1dcf "" "user-code/led/python/led-blue-red.py" 1619660175 1039 339cefbe997737f931646cba049b8d12 "" "user-code/led/python/led-blue.py" 1619658381 723 be6248a455119500e6930030c0c92250 "" @@ -286,8 +286,8 @@ "user-code/pot/scilab/pot-threshold.sce" 1615963614 624 2bab29d371a2666f033dd6bccad5bb73 "" "user-code/push/OpenModelica/led-push-button.mo" 1619402658 1253 4810c5325e53ee3cedf2d65cc6aad6e0 "" "user-code/push/OpenModelica/push-button-status.mo" 1619402620 1078 0e270b3c447b59263f2348b23a7a1768 "" - "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/arduino/led-push-button/led-push-button.ino" 1619777073 396 7fd786718c913889409fa7cf97781c53 "" + "user-code/push/arduino/push-button-status/push-button-status.ino" 1619748698 377 9389a7a25c871ff815e529b8b21e5e20 "" "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 "" @@ -295,7 +295,7 @@ "user-code/push/figures/switch.png" 1617880485 220988 2689323a6f7a00d63e81ef7abb52961a "" "user-code/push/julia/led-push-button.jl" 1617924745 322 d30bfe6d32217f97887be1e16f2fc0d1 "" "user-code/push/julia/push-button-status.jl" 1617924444 201 a6e3d7882c902f9c4cac399b9ca59eeb "" - "user-code/push/push.tex" 1617906984 23149 931abba34e8d18444b61bb1d6de3e1d4 "" + "user-code/push/push.tex" 1619749615 23377 4e94337f91305387950c04b79068dc53 "" "user-code/push/python/led-push-button.py" 1619089065 840 4bb8db9727a8e8653a21fbbc7b7526d7 "" "user-code/push/python/push-button-status.py" 1619089055 722 f58f02f7b8f3f6ec8ed84f102fba6df1 "" "user-code/push/scilab/led-push-button.sce" 1615963614 343 cf0876406ea3698e7f8fabac2dd17128 "" @@ -387,18 +387,18 @@ "user-code/thermistor/scilab/therm-read.sce" 1615963614 382 5e743c25b50f9d961a2939ce81d7b633 "" "user-code/thermistor/thermistor.tex" 1618567312 25838 1f7c3824e3c28084af6bca0235c3226f "" (generated) + "floss-arduino.pyd" + "floss-arduino.lof" + "floss-arduino.aux" + "floss-arduino.thm" + "floss-arduino.cod" + "floss-arduino.pdf" "floss-arduino.ard" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino.toc" - "floss-arduino.log" + "floss-arduino.lot" "floss-arduino.OpenModelicad" + "floss-arduino.juliad" + "floss-arduino.log" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" - "floss-arduino.pdf" - "floss-arduino.lot" - "floss-arduino.cod" - "floss-arduino.thm" - "floss-arduino.pyd" "floss-arduino.idx" - "floss-arduino.aux" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" - "floss-arduino.juliad" - "floss-arduino.lof" diff --git a/floss-arduino.log b/floss-arduino.log index d3457e2..8058ec3 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) 30 APR 2021 00:56 +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 30 APR 2021 16:19 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -1378,10 +1378,10 @@ t.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output .png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le -d/figures/led_output.png used on input line 196. +d/figures/led_output.png used on input line 197. (pdftex.def) Requested size: 357.73405pt x 229.47339pt. LaTeX Font Info: Trying to load font information for T1+cmss on input line 2 -08. +09. (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmss.fd File: t1cmss.fd 2019/12/16 v2.5j Standard LaTeX font definitions @@ -1397,8 +1397,8 @@ ed-blue-red.ino) k/led-green-blink.ino) [73] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) -(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) [74] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay. sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay. @@ -1417,14 +1417,13 @@ com-2.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-c om-2.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le -d/figures/led-blue-com-2.png used on input line 394. +d/figures/led-blue-com-2.png used on input line 396. (pdftex.def) Requested size: 178.86702pt x 162.47923pt. - -Overfull \hbox (4.77844pt too wide) in paragraph at lines 410--419 + [76] +Overfull \hbox (4.77844pt too wide) in paragraph at lines 412--421 [][] [] -[76] </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay -com-2.png, id=439, 848.16875pt x 694.595pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue- @@ -1432,10 +1431,10 @@ delay-com-2.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-d elay-com-2.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le -d/figures/led-blue-delay-com-2.png used on input line 429. +d/figures/led-blue-delay-com-2.png used on input line 431. (pdftex.def) Requested size: 178.86702pt x 146.47337pt. -Overfull \hbox (4.77844pt too wide) in paragraph at lines 444--456 +Overfull \hbox (4.77844pt too wide) in paragraph at lines 446--458 [][] [] @@ -1448,34 +1447,32 @@ red-com-2.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-r ed-com-2.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le -d/figures/led-blue-red-com-2.png used on input line 467. +d/figures/led-blue-red-com-2.png used on input line 469. (pdftex.def) Requested size: 178.86702pt x 173.66284pt. -Overfull \hbox (13.85292pt too wide) in paragraph at lines 483--500 +Overfull \hbox (13.85292pt too wide) in paragraph at lines 485--502 [][] [] +[78 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-d +elay-com-2.png>] </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blin -k-com-2.png, id=446, 869.2475pt x 678.535pt> +k-com-2.png, id=450, 869.2475pt x 678.535pt> File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green -blink-com-2.png Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green- blink-com-2.png> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le -d/figures/led-green-blink-com-2.png used on input line 510. +d/figures/led-green-blink-com-2.png used on input line 512. (pdftex.def) Requested size: 178.86702pt x 139.61826pt. -Overfull \hbox (4.77844pt too wide) in paragraph at lines 525--538 +Overfull \hbox (4.77844pt too wide) in paragraph at lines 527--540 [][] [] -[78 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-d -elay-com-2.png>] [79 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/f -igures/led-blue-red-com-2.png>] -Underfull \vbox (badness 1515) has occurred while \output is active [] - - [80 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green --blink-com-2.png>] +[79 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-r +ed-com-2.png>] [80 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/fig +ures/led-green-blink-com-2.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue.py) @@ -1520,15 +1517,15 @@ mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- delay.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- -delay.mo) +delay.mo) [90] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue. -mo [90]) +mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- delay.mo [91]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- -red.mo) +red.mo) [92] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-green --blink.mo [92])) (./user-code/push/push.tex [93] [94 +-blink.mo)) (./user-code/push/push.tex [93] [94 ] Chapter 5. @@ -1578,7 +1575,7 @@ tatus/push-button-status.ino) on/led-push-button.ino) [98] (/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 174--177 +Overfull \hbox (0.16989pt too wide) in paragraph at lines 179--182 []\T1/cmr/m/n/10.95 Turning the LED on or off de-pend-ing on the push-but-ton. Avail- [] @@ -1591,10 +1588,10 @@ 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) +n.sce) [100] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st -atus.sce [100]) -Overfull \hbox (0.145pt too wide) in paragraph at lines 227--230 +atus.sce) +Overfull \hbox (0.145pt too wide) in paragraph at lines 232--235 \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- @@ -1610,10 +1607,10 @@ ton-status.PNG Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-butt on-status.PNG> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu -sh/figures/push-button-status.PNG used on input line 258. +sh/figures/push-button-status.PNG used on input line 263. (pdftex.def) Requested size: 178.86702pt x 180.9012pt. -Overfull \hbox (3.33746pt too wide) in paragraph at lines 276--286 +Overfull \hbox (3.33746pt too wide) in paragraph at lines 281--291 [][] [] @@ -1626,10 +1623,10 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push <use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push- button.PNG> Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu -sh/figures/led-push-button.PNG used on input line 301. +sh/figures/led-push-button.PNG used on input line 306. (pdftex.def) Requested size: 178.86702pt x 158.59492pt. -Overfull \hbox (4.77844pt too wide) in paragraph at lines 318--329 +Overfull \hbox (4.77844pt too wide) in paragraph at lines 323--334 [][] [] @@ -2584,7 +2581,7 @@ 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 (252 pages, 20895255 bytes). +Output written on floss-arduino.pdf (252 pages, 20895849 bytes). PDF statistics: 1125 PDF objects out of 1200 (max. 8388607) 654 compressed objects within 7 object streams diff --git a/floss-arduino.pdf b/floss-arduino.pdf Binary files differindex ad005d7..a5d6673 100644 --- a/floss-arduino.pdf +++ b/floss-arduino.pdf diff --git a/floss-arduino.thm b/floss-arduino.thm index 5ca0eb1..1454010 100644 --- a/floss-arduino.thm +++ b/floss-arduino.thm @@ -10,10 +10,10 @@ \contentsline {ardmass}{{Arduino Code}{4.{4}}{}}{73}% \contentsline {egmass}{{Exercise}{4.{2}}{}}{75}% \contentsline {codemass}{{Scilab Code}{4.{1}}{}}{75}% -\contentsline {codemass}{{Scilab Code}{4.{2}}{}}{75}% +\contentsline {codemass}{{Scilab Code}{4.{2}}{}}{76}% \contentsline {codemass}{{Scilab Code}{4.{3}}{}}{76}% \contentsline {codemass}{{Scilab Code}{4.{4}}{}}{76}% -\contentsline {egmass}{{Exercise}{4.{3}}{}}{79}% +\contentsline {egmass}{{Exercise}{4.{3}}{}}{80}% \contentsline {egmass}{{Exercise}{4.{4}}{}}{82}% \contentsline {pymass}{{Python Code}{4.{1}}{}}{83}% \contentsline {pymass}{{Python Code}{4.{2}}{}}{83}% @@ -23,10 +23,10 @@ \contentsline {juliamass}{{Julia Code}{4.{2}}{}}{88}% \contentsline {juliamass}{{Julia Code}{4.{3}}{}}{88}% \contentsline {juliamass}{{Julia Code}{4.{4}}{}}{88}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{1}}{}}{90}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{1}}{}}{91}% \contentsline {OpenModelicamass}{{OpenModelica Code}{4.{2}}{}}{91}% \contentsline {OpenModelicamass}{{OpenModelica Code}{4.{3}}{}}{92}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{4}}{}}{92}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{4.{4}}{}}{93}% \contentsline {ardmass}{{Arduino Code}{5.{1}}{}}{99}% \contentsline {ardmass}{{Arduino Code}{5.{2}}{}}{99}% \contentsline {codemass}{{Scilab Code}{5.{1}}{}}{101}% diff --git a/user-code/led/led.tex b/user-code/led/led.tex index 8848777..2885275 100644 --- a/user-code/led/led.tex +++ b/user-code/led/led.tex @@ -66,12 +66,12 @@ given in \figref{fig:ledblock}. \caption{Internal connection diagram for LED on the shield}
\label{fig:ledblock}
\end{figure}
-The anode pins of red, green and blue are, respectively, connected to
-pins 11, 10 and 9. Common Cathode is connected to the ground.
+The anode pins of red, green, and blue are connected to pins 11, 10, and 9,
+respectively. Common Cathode is connected to the ground.
It should be pointed out, however, that no wire connections are to be
-made by the learner: all the required connections are already
-internally made available. The LED of any colour can be turned on by
+made by the learner: all the required connections are already made internally
+and it is ready to use. The LED of any colour can be turned on by
putting a high voltage on the corresponding anode pin.
\begin{figure}
@@ -112,8 +112,8 @@ As shown in \figref{fig:ard-rgb-bread}, there is an RGB LED with four legs. From the left, the first leg represents the anode (+) pin for the red LED.
The second leg represents the common cathode for every color.
The third and fourth legs represent the anode (+) pins for the green LED and blue LED respectively.
-The anode pins of red, green, and blue are, respectively, connected to digital pins 11, 10, and 9 of Arduino Uno.
-On the other hand, common cathode is connected to the ground (GND) terminal of Arduino Uno.
+The anode pins of red, green, and blue are connected to digital pins 11, 10, and 9 of Arduino Uno, respectively.
+Common cathode is connected to the ground (GND) terminal of Arduino Uno.
\section{Lighting the LED from the Arduino IDE}
@@ -123,7 +123,8 @@ In this section, we will describe some experiments that will help the LED light up based on the command given from the Arduino IDE. We will
also give the necessary code. We will present four experiments in
this section. The shield has to be attached to the \arduino\ board
-before doing these experiments. The reader should go through the
+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 First, we will see how to light up the LED in different
@@ -262,8 +263,9 @@ shield is not used. \label{sec:light-sci}
In this section, we discuss how to carry out the experiments of the
previous section from Scilab. We will list the same four experiments,
-in the same order. The shield has to be attached to the \arduino\
-before carrying out these experiments, as in \secref{sec:light-ard}.
+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:sci-start} before getting started.
\begin{enumerate}
@@ -593,8 +595,9 @@ getting started. \label{sec:light-py}
In this section, we discuss how to carry out the experiments of the
previous section from Python. We will list the same four experiments,
-in the same order. The shield has to be attached to the \arduino\
-before carrying out these experiments, as in \secref{sec:light-ard}.
+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}
@@ -734,8 +737,9 @@ The reader should go through the instructions given in \label{sec:light-julia}
In this section, we discuss how to carry out the experiments of the
previous section from Julia. We will list the same four experiments,
-in the same order. The shield has to be attached to the \arduino\
-before carrying out these experiments, as in \secref{sec:light-ard}.
+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}
@@ -823,8 +827,9 @@ The reader should go through the instructions given in \secref{sec:julia-start} \label{sec:light-OpenModelica}
In this section, we discuss how to carry out the experiments of the
previous section from OpenModelica. We will list the same four experiments,
-in the same order. The shield has to be attached to the \arduino\
-before carrying out these experiments, as in \secref{sec:light-ard}.
+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.
diff --git a/user-code/push/arduino/led-push-button/led-push-button.ino b/user-code/push/arduino/led-push-button/led-push-button.ino index 4b831ff..81c75a4 100644 --- a/user-code/push/arduino/led-push-button/led-push-button.ino +++ b/user-code/push/arduino/led-push-button/led-push-button.ino @@ -3,12 +3,12 @@ const int ledPin = 9; int sensorValue; int i; void setup() { - Serial.begin(115200); + Serial.begin(9600); pinMode(9, OUTPUT); pinMode(12, INPUT); for (i = 0; i < 1000; i++) { sensorValue = digitalRead(12); - if (sensorValue==0) { + if (sensorValue == 0) { digitalWrite(9, LOW); delay(5); } diff --git a/user-code/push/arduino/push-button-status/push-button-status.ino b/user-code/push/arduino/push-button-status/push-button-status.ino index bb55e26..caae0dc 100644 --- a/user-code/push/arduino/push-button-status/push-button-status.ino +++ b/user-code/push/arduino/push-button-status/push-button-status.ino @@ -3,7 +3,7 @@ int sensorValue = 0; void setup() { Serial.begin(115200); pinMode(sensorPin, INPUT); // declare the sensorPin as an INPUT - for (int i = 0; i < 1000;i++){ + for (int i = 0; i < 1000; i++){ sensorValue = digitalRead(sensorPin); // read push-button value Serial.println(sensorValue); // print it at the Serial Monitor } diff --git a/user-code/push/push.tex b/user-code/push/push.tex index 5d32a65..c5c5cd7 100644 --- a/user-code/push/push.tex +++ b/user-code/push/push.tex @@ -85,8 +85,8 @@ 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
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 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
@@ -115,7 +115,7 @@ are same as that in \figref{fig:switch-bread}. \section{Reading the Pushbutton Status from the Arduino IDE}
\subsection{Reading the Pushbutton Status}
-In this section, we shall learn commands to read the status of a
+In this section, we shall learn the commands to read the status of a
pushbutton through Arduino IDE. Later, we shall change the state of
the LED depending on the status of the pushbutton.
\begin{enumerate}
@@ -127,8 +127,10 @@ the LED depending on the status of the pushbutton. \ardref{ard:push-100}. In the initialization part of the code, we
assign the sensor pin to be read, 12 in this case, to a variable for
ease. Next, we initialize the port for serial port communication at
- data rate of 9600 bits per second and declare the digital pin 12 as an input pin using the command {\tt pinMode}. After initialization, we start reading the status of the pushbutton using the following command:
- \lstinputlisting[firstline=5,lastline=5]
+ data rate of 9600 bits per second and declare the digital pin 12 as an
+ input pin using the command {\tt pinMode}. After initialization,
+ we start reading the status of the pushbutton using the following command:
+ \lstinputlisting[firstline=7,lastline=7]
{\LocPushardcode/push-button-status/push-button-status.ino}
Note that the input argument to this command is the digital pin 12
@@ -147,12 +149,15 @@ serial monitor. experiment is given in \ardref{ard:push-200}. This experiment can be
taken as a step further to the previous one. We declare the LED pin
to be controlled as an output pin by,
- \lstinputlisting[firstline=6,lastline=6]
+ \lstinputlisting[firstline=7,lastline=7]
{\LocPushardcode/led-push-button/led-push-button.ino} Next, we read
- the potentiometer value from digital pin 12. If the value is ``1'',
+ the pusbhutton value from digital pin 12. If the value is ``1'',
we turn on the LED at pin 9 else we turn it off. The
condition check is performed using {\tt if else} statements. We run
- these commands for 1000 iterations.
+ these commands for 1000 iterations. While running this experiment, the reader
+ must press and release the pushbutton. Accordingly, they can observe whether
+ the LED glows when the pushbutton is pressed
+ % \redcolor{Serial monitor}.
\end{enumerate}
\subsection{Arduino Code}
|