FSM Lecture 49: Exercise-006 Test HSM transition execution sequence on Arduino

  • Post author:
  • Post category:Blog

 

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.

Figure 1. qhsmtst model
Figure 1. qhsmtst model

 

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

  1. Create a new Arduino project. First, Launch the Visual Studio Code (VS Code) IDE.
  2. To create a new project, go to PlatformIO→ Home→ Open→ New Project.
  3. Assign the project name as “006QHsmTest” and select the appropriate board, namely ‘Arduino Uno.’
  4. The framework is Arduino, and select the location and click “Finish“.
HSM transition execution sequence on Arduino
Figure 2. 006QHsmTest Project

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.

  1. Access the File Explorer and navigate to the “qm” folder.
  2. Import and organize the necessary “qm” model files into this folder.
HSM transition execution sequence on Arduino
Figure 3. qm model files

 

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

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply