====== UML State Machine ====== /* {{https://upload.wikimedia.org/wikipedia/en/4/45/UML_state_machine_Fig1.png?600}} */ {{:rtes:topics:arduino:uml_state_machine_v002.png?direct&600|}} Source: https://en.wikipedia.org/wiki/UML_state_machine Additional Information: * :!: https://en.wikipedia.org/wiki/UML_state_machine * Finite State Machine: https://en.wikipedia.org/wiki/Finite-state_machine * State Diagram: https://en.wikipedia.org/wiki/State_diagram {{https://upload.wikimedia.org/wikipedia/commons/2/20/UML_state_machine_Fig5.png?600}} ===== Presentation ===== * ===== Youtube ===== * Dũng Trần Đăng: [[https://www.youtube.com/watch?v=A_W8scZTM9Y&t=398s|Building a State Machine to Multitask with Arduino!]] * ItKindaWorks: [[https://www.youtube.com/watch?v=zhWV_D_9OCY|How to multi-task on an Arduino]] ===== Exercise ===== ==== 1. Bank Safe ==== === Step === Connect a potentiometer to A0. Use the function //valRange = map(...)// to map the raw potentiometer values to the integer numbers 0..9 . The variable //varRange// can acquire these 10 different values. Print the current value of //valRange// to the terminal, but only, if the value changes.