Exercise-006 Test HSM transition execution sequence on Arduino
This article focuses on creating an Arduino project to effectively test the “qhsmtst” model, as illustrated in Figure 1. The objective of this exercise is to gain a comprehensive understanding of various transition sequences within a nested hierarchical state machine (HSM) by simulating diverse events.
The core of this article centers around the “qhsmtst.qm” model, which is readily available within the QP framework. Through this exercise, we aim to to understand various transition sequences in a nested hierarchical state machine by sending various events.
Create the Arduino Project
- Create a new Arduino project. First, Launch the Visual Studio Code (VS Code) IDE.
- To create a new project, go to PlatformIO→ Home→ Open→ New Project.
- Assign the project name as “006QHsmTest” and select the appropriate board, namely ‘Arduino Uno.’
- The framework is Arduino, and select the location and click “Finish“.
We created a 006QHsmTest project. And in this project, create a new folder, call it qm. ‘qm’ folder will be used to keep the qm model.
- Access the File Explorer and navigate to the “qm” folder.
- Import and organize the necessary “qm” model files into this folder.
This comprehensive approach sets the stage for effectively testing the HSM transition execution sequence on your Arduino. The subsequent steps will involve crafting the actual testing code, executing the sequence, and evaluating the outcomes.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1