Skip to content

Commit

Permalink
Merge pull request #7 from lmtreser/dev
Browse files Browse the repository at this point in the history
Organizacion de codigo
  • Loading branch information
lmtreser authored Jan 25, 2024
2 parents 0f346e2 + e1decfa commit 96a83f6
Show file tree
Hide file tree
Showing 131 changed files with 1,300 additions and 748 deletions.
112 changes: 112 additions & 0 deletions docs/Button_8h_source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Robotec: Fichero Fuente Button.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Robotec<span id="projectnumber">&#160;1.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Buscar','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Buscar');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle"><div class="title">Button.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/* -- Button --</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Parte de la biblioteca &quot;Robotec&quot; </span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * created 20 Dic 2023</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * by Lucas Martin Treser</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">*/</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#ifndef Button_h</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#define Button_h</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;Arduino.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">/*** Constantes Globales Button ***/</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">static</span> <span class="keyword">const</span> uint8_t PULL_UP = 0;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">static</span> <span class="keyword">const</span> uint8_t PULL_UP_INTERNAL = 2;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">static</span> <span class="keyword">const</span> uint8_t PULL_DOWN = 3;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">/*** Pulsador ***/</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classButton.html"> 18</a></span><span class="keyword">class </span><a class="code hl_class" href="classButton.html">Button</a> {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <a class="code hl_function" href="classButton.html#a14fad28727c495daab28f211360007c2">Button</a>(uint8_t buttonPin, uint8_t buttonMode);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classButton.html#acd04d3c7f75689686e1465e8ccba657c">push</a>();</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classButton.html#a7db25af32d9c7b47f8161542f2299b9a">pushStart</a>(uint16_t time);</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classButton.html#a7db25af32d9c7b47f8161542f2299b9a">pushStart</a>(<span class="keywordtype">void</span> (*callback)());</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> uint8_t _buttonPin;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> uint8_t _buttonMode;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> uint8_t _buttonState;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> uint8_t _buttonLastState;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> uint32_t _timeLast;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">static</span> <span class="keyword">const</span> uint32_t _TIME_DEBOUNCE = 50; <span class="comment">// Ajustar este valor según sea necesario</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>};</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassButton_html"><div class="ttname"><a href="classButton.html">Button</a></div><div class="ttdef"><b>Definition:</b> Button.h:18</div></div>
<div class="ttc" id="aclassButton_html_a14fad28727c495daab28f211360007c2"><div class="ttname"><a href="classButton.html#a14fad28727c495daab28f211360007c2">Button::Button</a></div><div class="ttdeci">Button(uint8_t buttonPin, uint8_t buttonMode)</div><div class="ttdoc">Pulsador (pushbutton)</div><div class="ttdef"><b>Definition:</b> Button.cpp:15</div></div>
<div class="ttc" id="aclassButton_html_a7db25af32d9c7b47f8161542f2299b9a"><div class="ttname"><a href="classButton.html#a7db25af32d9c7b47f8161542f2299b9a">Button::pushStart</a></div><div class="ttdeci">void pushStart(uint16_t time)</div><div class="ttdoc">Lee el estado de un Pulsador y genera una demora bloqueante (delay) segun el tiempo especificado por ...</div><div class="ttdef"><b>Definition:</b> Button.cpp:55</div></div>
<div class="ttc" id="aclassButton_html_acd04d3c7f75689686e1465e8ccba657c"><div class="ttname"><a href="classButton.html#acd04d3c7f75689686e1465e8ccba657c">Button::push</a></div><div class="ttdeci">bool push()</div><div class="ttdoc">Lee el estado de un boton.</div><div class="ttdef"><b>Definition:</b> Button.cpp:33</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generado por&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
113 changes: 113 additions & 0 deletions docs/Led_8h_source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Robotec: Fichero Fuente Led.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Robotec<span id="projectnumber">&#160;1.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Buscar','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Buscar');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle"><div class="title">Led.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/* -- Led --</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Parte de la biblioteca &quot;Robotec&quot; </span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * created 20 Dic 2023</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * by Lucas Martin Treser</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">*/</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#ifndef Led_h</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#define Led_h</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;Arduino.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">/*** LED Testigo ***/</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classLed.html"> 13</a></span><span class="keyword">class </span><a class="code hl_class" href="classLed.html">Led</a> {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <a class="code hl_function" href="classLed.html#afabbd84bf865e86de2801083235cb49a">Led</a>(uint8_t ledPin);</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classLed.html#aacd02b0eb819d77c24e93adf02102fae">on</a>(); <span class="comment">// Enciende</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classLed.html#a074b561e0b5a9501f77b606223ec039d">off</a>(); <span class="comment">// Apaga</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classLed.html#addb51d306b7276ff8ef60e348ed503df">toogle</a>(); <span class="comment">// Cambia el estado</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classLed.html#aeb55192e5ab4c2cc9487aa2222da0447">blinkStart</a>(uint16_t time); <span class="comment">// Destello, ejecutar en loop()</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classLed.html#aeb55192e5ab4c2cc9487aa2222da0447">blinkStart</a>(uint16_t time, uint8_t pulses); <span class="comment">// Destello controlado, ejecutar en loop()</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classLed.html#acf8747a672fe5f3dba4a664e5e173618">blinkStop</a>(); <span class="comment">// Finaliza el destello</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordtype">bool</span> _statusLed;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">bool</span> _blinkStopValue;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordtype">bool</span> _blinkFlag;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> uint8_t _blinkPulses;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> uint8_t _ledPin;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> uint32_t _lastMillis;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>};</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassLed_html"><div class="ttname"><a href="classLed.html">Led</a></div><div class="ttdef"><b>Definition:</b> Led.h:13</div></div>
<div class="ttc" id="aclassLed_html_a074b561e0b5a9501f77b606223ec039d"><div class="ttname"><a href="classLed.html#a074b561e0b5a9501f77b606223ec039d">Led::off</a></div><div class="ttdeci">void off()</div><div class="ttdoc">Apaga un LED.</div><div class="ttdef"><b>Definition:</b> Led.cpp:31</div></div>
<div class="ttc" id="aclassLed_html_aacd02b0eb819d77c24e93adf02102fae"><div class="ttname"><a href="classLed.html#aacd02b0eb819d77c24e93adf02102fae">Led::on</a></div><div class="ttdeci">void on()</div><div class="ttdoc">Enciende un LED.</div><div class="ttdef"><b>Definition:</b> Led.cpp:26</div></div>
<div class="ttc" id="aclassLed_html_acf8747a672fe5f3dba4a664e5e173618"><div class="ttname"><a href="classLed.html#acf8747a672fe5f3dba4a664e5e173618">Led::blinkStop</a></div><div class="ttdeci">void blinkStop()</div><div class="ttdoc">Detiene el destello de un LED iniciado por blinkStart()</div><div class="ttdef"><b>Definition:</b> Led.cpp:42</div></div>
<div class="ttc" id="aclassLed_html_addb51d306b7276ff8ef60e348ed503df"><div class="ttname"><a href="classLed.html#addb51d306b7276ff8ef60e348ed503df">Led::toogle</a></div><div class="ttdeci">void toogle()</div><div class="ttdoc">Cambia el estado de un LED.</div><div class="ttdef"><b>Definition:</b> Led.cpp:36</div></div>
<div class="ttc" id="aclassLed_html_aeb55192e5ab4c2cc9487aa2222da0447"><div class="ttname"><a href="classLed.html#aeb55192e5ab4c2cc9487aa2222da0447">Led::blinkStart</a></div><div class="ttdeci">void blinkStart(uint16_t time)</div><div class="ttdoc">Inicia el destello de un LED, ejecutar en loop().</div><div class="ttdef"><b>Definition:</b> Led.cpp:49</div></div>
<div class="ttc" id="aclassLed_html_afabbd84bf865e86de2801083235cb49a"><div class="ttname"><a href="classLed.html#afabbd84bf865e86de2801083235cb49a">Led::Led</a></div><div class="ttdeci">Led(uint8_t ledPin)</div><div class="ttdoc">LED testigo.</div><div class="ttdef"><b>Definition:</b> Led.cpp:13</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generado por&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
Loading

0 comments on commit 96a83f6

Please sign in to comment.