Download QP™ Nano Arduino library
In this article, let’s understand downloading the QP-nano Arduino library.
For that, go-to state-machine.com website, click on resources and go to Arduino, as shown in Figure 1.
And after that, download QP Arduino for your machine; I will go for windows.
First, let’s install the QP framework. Just double click on qp-windows_6.9.3, as shown in Figure 3.
After that, click next, as shown in Figure 4.
After that, select I accept the agreement and click next.
And select the directory. By default, it will get installed in the ‘C’ directory. That’s fine.
Here you can deselect the things which you don’t require. For example, we are not using an ARM processor here so you may deselect the option. And we’re also not using QP/C++ so that you can deselect that too. But I’ll keep everything because I have enough disk space. I will click next.
And click next (Figure 8), Install(Figure 9).
Installing is taking some time.
After the installation, click finish, as shown in Figure 11.
The installation is over. And now, let’s install the QP Arduino library. Let’s go back to the download and extract the Zip file, as shown in Figure 12.
After that, you have to copy all these things( shown in Figure 13) and paste it into the Arduino sketchbook location.
For that, open the Arduino IDE. Open the Arduino IDE→ Go to file → preferences. Copy the location, as shown in Figure 14;
Then, go to File Explorer and open that location.
See Figure 15; this is a sketchbook location. You have to paste it here.
Now the files are copied into sketchbook location. And if you go under libraries, you can see there are two libraries. qpcpp for Arm-based Arduino boards and qpn is QP-nano framework for AVR-based Arduino boards, as shown in Figure 16.
This has all the framework-related source files. We successfully integrated the Arduino library.
And in the following lecture, we will test a Transition execution sequence and event propagation on the Arduino board.
This is an example of understanding various transition execution sequences and event propagation in a nested hierarchical state machine diagram. And this example is already available in the QP framework that you have downloaded and installed. It is at this location(Figure 18). So, you can test this application directly on your machine. You need not use any hardware, Arduino hardware, or any other board, you can directly test it on the machine.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1