2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <meta charset="utf-8"/>
5 <meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
7 <style type="text/css">
9 /* Minimal style sheet for the HTML output of Docutils. */
11 /* :Author: Günter Milde, based on html4css1.css by David Goodger */
12 /* :Id: $Id: minimal.css 7952 2016-07-26 18:15:59Z milde $ */
13 /* :Copyright: © 2015 Günter Milde. */
14 /* :License: Released under the terms of the `2-Clause BSD license`_, */
17 /* Copying and distribution of this file, with or without modification, */
18 /* are permitted in any medium without royalty provided the copyright */
19 /* notice and this notice are preserved. */
21 /* This file is offered as-is, without any warranty. */
23 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
25 /* This CSS2.1_ stylesheet defines rules for Docutils elements without */
26 /* HTML equivalent. It is required to make the document semantic visible. */
28 /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
29 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
31 /* alignment of text and inline objects inside block objects*/
32 .align-left { text-align: left; }
33 .align-right { text-align: right; }
34 .align-center { clear: both; text-align: center; }
35 .align-top { vertical-align: top; }
36 .align-middle { vertical-align: middle; }
37 .align-bottom { vertical-align: bottom; }
40 h1.title, p.subtitle {
47 p.system-message-title {
51 h1 + p.section-subtitle {
54 h2 + p.section-subtitle { font-size: 1.28em; }
65 p.rubric { color: maroon; }
68 text-decoration: none; }
70 /* Warnings, Errors */
71 div.caution p.admonition-title,
72 div.attention p.admonition-title,
73 div.danger p.admonition-title,
74 div.error p.admonition-title,
75 div.warning p.admonition-title,
76 div.system-messages h1,
79 p.system-message-title {
84 span.docutils.literal {
85 font-family: monospace;
86 white-space: pre-wrap;
88 /* do not wraph at hyphens and similar: */
89 .literal > span.pre { white-space: nowrap; }
93 /* compact and simple lists: no margin between items */
94 .simple li, .compact li,
95 .simple ul, .compact ul,
96 .simple ol, .compact ol,
97 .simple > li p, .compact > li p,
98 dl.simple > dd, dl.compact > dd {
103 /* Table of Contents */
104 div.topic.contents { margin: 0; }
106 list-style-type: none;
107 padding-left: 1.5em; }
109 /* Enumerated Lists */
110 ol.arabic { list-style: decimal }
111 ol.loweralpha { list-style: lower-alpha }
112 ol.upperalpha { list-style: upper-alpha }
113 ol.lowerroman { list-style: lower-roman }
114 ol.upperroman { list-style: upper-roman }
116 dt span.classifier { font-style: italic }
117 dt span.classifier:before {
123 /* Field Lists and drivatives */
124 /* bold field name, content starts on the same line */
135 padding-right: 0.5em;
137 /* Offset for field content (corresponds to the --field-name-limit option) */
141 margin-left: 9em; /* ca. 14 chars in the test examples */
143 /* start field-body on a new line after long field names */
144 dl.field-list > dd > *:first-child,
145 dl.option-list > dd > *:first-child
147 display: inline-block;
151 /* field names followed by a colon */
152 dl.field-list > dt:after,
153 dl.docinfo > dt:after {
157 /* Bibliographic Fields (docinfo) */
158 pre.address { font: inherit; }
159 dd.authors > p { margin: 0; }
162 dl.option-list { margin-left: 40px; }
163 dl.option-list > dt { font-weight: normal; }
164 span.option { white-space: nowrap; }
166 /* Footnotes and Citations */
167 dl.footnote.superscript > dd {margin-left: 1em; }
168 dl.footnote.brackets > dd {margin-left: 2em; }
169 dl > dt.label { font-weight: normal; }
170 a.footnote-reference.brackets:before,
171 dt.label > span.brackets:before { content: "["; }
172 a.footnote-reference.brackets:after,
173 dt.label > span.brackets:after { content: "]"; }
174 a.footnote-reference.superscript,
175 dl.footnote.superscript > dt.label {
176 vertical-align: super;
179 dt.label > span.fn-backref { margin-left: 0.2em; }
180 dt.label > span.fn-backref > a { font-style: italic; }
183 div.line-block { display: block; }
184 div.line-block div.line-block {
190 /* Figures, Images, and Tables */
197 .figure.align-center,
199 object.align-center {
214 /* reset inner alignment in figures and tables */
215 div.align-left, div.align-center, div.align-right,
216 table.align-left, table.align-center, table.align-right
217 { text-align: inherit }
219 /* Admonitions and System Messages */
224 border: medium outset;
246 pre.code .ln { color: gray; } /* line numbers */
249 table { border-collapse: collapse; }
252 border-color: silver;
256 td > p:first-child, th > p:first-child { margin-top: 0; }
257 td > p, th > p { margin-bottom: 0; }
261 margin-bottom: 0.25em
264 table.borderless td, table.borderless th {
267 padding-right: 0.5em /* separate table cells */
271 <style type="text/css">
273 /* CSS31_ style sheet for the output of Docutils HTML writers. */
274 /* Rules for easy reading and pre-defined style variants. */
276 /* :Author: Günter Milde, based on html4css1.css by David Goodger */
277 /* :Id: $Id: plain.css 7952 2016-07-26 18:15:59Z milde $ */
278 /* :Copyright: © 2015 Günter Milde. */
279 /* :License: Released under the terms of the `2-Clause BSD license`_, */
282 /* Copying and distribution of this file, with or without modification, */
283 /* are permitted in any medium without royalty provided the copyright */
284 /* notice and this notice are preserved. */
286 /* This file is offered as-is, without any warranty. */
288 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
289 /* .. _CSS3: http://www.w3.org/TR/CSS3 */
292 /* Document Structure */
293 /* ****************** */
302 counter-reset: table;
303 /* counter-reset: figure; */
304 /* avoid long lines --> better reading */
305 /* OTOH: lines should not be too short because of missing hyphenation, */
324 /* vertical space (parskip) */
329 margin-bottom: 0.5em;
331 h1, h2, h3, h4, h5, h6,
333 margin-bottom: 0.5em;
339 /* Definition Lists */
341 dl > dd p:first-child { margin-top: 0; }
342 /* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
343 /* dl > dd p:last-child { margin-bottom: 0; } */
345 /* lists nested in definition lists */
346 /* :only-child is not part of CSS 2.1 (introduced in CSS 3) */
347 dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
349 /* Description Lists */
350 /* styled like in most dictionaries, encyclopedias etc. */
351 dl.description > dt {
357 padding-right: 0.5em;
362 /* example for custom field-name width */
363 dl.field-list.narrow > dd {
366 /* run-in: start field-body on same line after long field names */
367 dl.field-list.run-in > dd p {
371 /* Bibliographic Fields */
373 /* generally, bibliographic fields use special definition list dl.docinfo */
374 /* but dedication and abstract are placed into "topic" divs */
375 div.abstract p.topic-title {
383 div.dedication p.topic-title {
388 dl.citation dt.label {
399 pre.literal-block, pre.doctest-block,
417 blockquote p.attribution,
418 div.topic p.attribution {
426 /* th { vertical-align: bottom; } */
428 table tr { text-align: left; }
430 /* "booktabs" style (no vertical lines) */
433 border-top: 2px solid;
434 border-bottom: 2px solid;
435 border-collapse: collapse;
441 border-bottom: thin solid;
444 /* numbered tables (counter defined in div.document) */
445 table.numbered > caption:before {
446 counter-increment: table;
447 content: "Table " counter(table) ": ";
451 /* Explicit Markup Blocks */
452 /* ====================== */
454 /* Footnotes and Citations */
455 /* ----------------------- */
457 /* line on the left */
461 border-left-width: thin;
470 /* Images and Figures */
472 /* let content flow to the side of aligned images and figures */
489 /* Stop floating sidebars, images and figures at section level 1,2,3 */
490 h1, h2, h3 { clear: both; }
494 /* Move into the margin. In a layout with fixed margins, */
495 /* it can be moved into the margin completely. */
501 background-color: #ffffee ;
506 pre.code, code { background-color: #eeeeee }
507 pre.code .ln { color: gray; } /* line numbers */
508 /* basic highlighting: for a complete scheme, see */
509 /* http://docutils.sourceforge.net/sandbox/stylesheets/ */
510 pre.code .comment, code .comment { color: #5C6576 }
511 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
512 pre.code .literal.string, code .literal.string { color: #0C5404 }
513 pre.code .name.builtin, code .name.builtin { color: #352B84 }
514 pre.code .deleted, code .deleted { background-color: #DEB0A1}
515 pre.code .inserted, code .inserted { background-color: #A3D289}
518 /* styled separately (see math.css for math-output=HTML) */
523 /* Compound Paragraph */
526 /* can be styled in a custom stylesheet */
528 /* Document Header and Footer */
530 div.footer, div.header {
540 /* Strong Emphasis */
542 /* Interpreted Text */
543 /* span.interpreted */
544 /* Title Reference */
546 /* Inline Literals */
547 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
548 /* span.docutils.literal { white-space: pre-wrap; } */
550 /* Hyperlink References */
551 a { text-decoration: none; }
553 /* External Targets */
554 /* span.target.external */
555 /* Internal Targets */
556 /* span.target.internal */
557 /* Footnote References */
558 /* a.footnote-reference */
559 /* Citation References */
560 /* a.citation-reference */
565 <div class="document" id="fsm">
566 <h1 class="title">FSM</h1>
568 <p>Risorse utili per le Macchine a stati.</p>
569 <p>In questi esercizi vengono presentati alcuni paradigmi di base per la creazione
570 di macchine a stato con Arduino. Vengono proposti esempi con FSM singole e FSM
571 doppie concorrenti, per altri esempi pratici con semplici cicli IF, gestione degli eventi esterni / interni si puo' guardare anche il codice del progetto "Luci per Aerei RC":
572 - <a class="reference external" href="http://aerei.piffa.net/repo/esempi/base_th_3stati/base_th_3stati.ino">http://aerei.piffa.net/repo/esempi/base_th_3stati/base_th_3stati.ino</a>
573 - <a class="reference external" href="http://aerei.piffa.net/esempi/2017/02/15/throttle-fsm.html">http://aerei.piffa.net/esempi/2017/02/15/throttle-fsm.html</a>
574 - <a class="reference external" href="http://aerei.piffa.net/esempi/2017/02/20/alettoni-fsm.html">http://aerei.piffa.net/esempi/2017/02/20/alettoni-fsm.html</a>
575 - <a class="reference external" href="http://aerei.piffa.net/repo/aerei/">http://aerei.piffa.net/repo/aerei/</a></p>
576 <div class="section" id="tutorials">
579 <li><p><a class="reference external" href="https://www.sparkfun.com/news/1801">https://www.sparkfun.com/news/1801</a></p></li>
580 <li><p><a class="reference external" href="http://digitaldiy.io/articles/mcu-programming/general-programming/500-finite-state-+machines#.VT0r1s90yh3">http://digitaldiy.io/articles/mcu-programming/general-programming/500-finite-state-+machines#.VT0r1s90yh3</a></p></li>
581 <li><p><a class="reference external" href="http://www.gammon.com.au/forum/?id=12316">http://www.gammon.com.au/forum/?id=12316</a></p></li>
582 <li><p><a class="reference external" href="https://github.com/JChristensen/Button/blob/master/Examples/LongPress/LongPress.pde">https://github.com/JChristensen/Button/blob/master/Examples/LongPress/LongPress.pde</a></p></li>
583 <li><p><a class="reference external" href="http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html">http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html</a></p></li>
586 <div class="section" id="teoria">
589 <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Finite-state_machine">https://en.wikipedia.org/wiki/Finite-state_machine</a></p></li>
590 <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/State_diagram">https://en.wikipedia.org/wiki/State_diagram</a></p></li>
591 <li><p><a class="reference external" href="http://www.edn.com/design/systems-design/4416049/State-machines-ease-programming-microcontrollers">http://www.edn.com/design/systems-design/4416049/State-machines-ease-programming-microcontrollers</a></p></li>
592 <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton">https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton</a></p></li>
593 <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Deterministic_finite_automaton#Complete_and_incomplete">https://en.wikipedia.org/wiki/Deterministic_finite_automaton#Complete_and_incomplete</a></p></li>
594 <li><p><a class="reference external" href="http://43oh.com/2017/02/how-to-implement-finite-state-machines-using-energia/">http://43oh.com/2017/02/how-to-implement-finite-state-machines-using-energia/</a></p></li>
595 <li><p><a class="reference external" href="http://aigamedev.com/open/article/hierarchical-or-nested-fsm/">http://aigamedev.com/open/article/hierarchical-or-nested-fsm/</a></p></li>
598 <div class="section" id="elementi">
601 <li><p><a class="reference external" href="http://playground.arduino.cc/Code/Enum">http://playground.arduino.cc/Code/Enum</a></p></li>
602 <li><p><a class="reference external" href="https://www.arduino.cc/en/Reference/SwitchCase">https://www.arduino.cc/en/Reference/SwitchCase</a></p></li>
603 <li><p><a class="reference external" href="https://learn.adafruit.com/multi-tasking-the-arduino-part-1">https://learn.adafruit.com/multi-tasking-the-arduino-part-1</a></p></li>