Part 2 of a Modern Embedded Systems Programming course covering guard conditions and choice pseudostates in UML state machines. Using a TimeBomb application on a TivaC LaunchPad as a practical example, the lesson demonstrates how guard conditions (boolean expressions evaluated at runtime) add flexibility to state machines when behavior depends on runtime values unknown at design time. The implementation uses a blink_counter variable with a choice pseudostate to decide whether to continue blinking or trigger the 'boom' state. Code is implemented manually in C using nested switch statements. The lesson also warns against overusing guard conditions, as excessive use leads back to spaghetti code.
•14m watch time
3 Impressions