States and Watchdog

Created by Miroslav Biňas / mirek

## Annoucements
## [IoT Course Rules have been updated](info.html)
[![Act in Space Hackathon](images/hackathon-act.in.space.banner.jpg)](https://actinspace.org/) https://actinspace.org
## [Čo s aplikáciou po nasadení?](https://uvptechnicom.sk/event/co-s-aplikaciou-po-nasadeni/) (MiB) (16. novembra 2022 15:30 - 17:00, UVP TECHNICOM, je potrebná [registrácia](https://rezervacie.uvptechnicom.sk/form/form?id=208&tok=cd1ae82f10b49a39b8f49f01796467e409810af7461d789412ce1b7f3c07ea28))
> "Chceme robiť IoT!" > > -- (neznámy študent predmetu Internet vecí)
![Programujeme ESP32 v jazyku MicroPython](https://scontent.fbts10-1.fna.fbcdn.net/v/t39.30808-6/315694893_517609650379772_105767162369744463_n.jpg?_nc_cat=102&ccb=1-7&_nc_sid=730e14&_nc_ohc=5waraMWZjHQAX-adnrf&_nc_ht=scontent.fbts10-1.fna&oh=00_AfDRX6jREYKGJr88r3b4GArxK5zYgMzZFzwG7ImY-JzztQ&oe=6377A8E8) http://namakanyden.sk/workshopy/
## Once Upon a Time...
![Blue Screen of Death](images/bsod.png) notes: * https://en.wikipedia.org/wiki/Blue_screen_of_death#/media/File:Windows_9X_BSOD.png
![Blue Screen of Death on ATM](images/bsod.on.atm.jpg) notes: * https://www.flickr.com/photos/tony_wasserman/3484632244
> **BSoD** is an error screen displayed on a Windows computer system following a **fatal system error**. It indicates a system crash, in which the **OS has reached a condition where it can no longer operate safely**. ([Wikipedia](https://en.wikipedia.org/wiki/Blue_screen_of_death))
> A **state machine** is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. ([Wikipedia](https://en.wikipedia.org/wiki/Finite-state_machine))
## State Diagram
## Components of State Diagram * states * transitions * initial state * final state
![Turnstille at Toilet](images/turnstille.jpg)
![State Diagram of Turnstile](images/state.machine-turnstile.svg)
## State Design Pattern
![State Diagram Representing Game Actor [@Nystrom2014]](images/state-flowchart.png)
![Watchdog](images/watchdog.png) notes: * https://www.uihere.com/free-cliparts/french-bulldog-pit-bull-clip-art-watchdog-5810491
## Questions?