Skip to content
QP real-time embedded frameworks/RTOS for Arduino (AVR and SAM)
C++ C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libraries 6.5.1 Jul 17, 2019
.gitignore
QP-Arduino-Playground.url 5.8.0 Jan 30, 2017
QP-Arduino_GPL_Exception.txt
README.md 6.5.1 Jul 17, 2019

README.md

This README provides a quick overview of QP for Arduino. Please refer to the companion webiste to this project at:

https://www.state-machine.com/arduino


Software Installation

The QP adaptation for Arduino is distributed in a single ZIP archive qp-<ver>_arduino-1.8.x.zip, where <ver> stands for the version of the QP frameworks.

You need to unzip the qp-<ver>_arduino-1.8.x.zip archive into your Arduino <Sketchbook> folder. To find out where your <Sketchbook> folder is, or to configure a different location for your <Sketchbook> folder, you need to open the Arduino IDE and select File|Preferences menu. The Sketchbook location will be shown at the top of the Preferences dialog box. Once you identify the <Sketchbook> folder, you simply unzip the whole qp-<ver>_arduino-1.8.x.zip archive to this folder.


Provided Libraries

The archive qp-<ver>_arduino-1.8.x.zip contains two external libraries for Arduino:

  • qpcpp_sam -- QP/C++ framework for SAM-based Arduinos
  • qpn_avr -- QP-nano framework for AVR-based Arduinos

After the installation, your Arduino <Sketchbook> folder should look as follows:

<Sketchbook>/             - your Arduino Sketchbook folder
 |
 +-libraries/             - libraries folder
 | +-qpcpp_sam/           - QP/C++ library for SAM-based Arduinos
 | | +-examples/          - QP/C++ library examples
 | | | +-blinky/          - Blinky example
 | | | | +-blinky.ino     - Blinky code (generated)
 | | | | +-blinky.qm      - Blinky model (for QM tool)
 | | +-src/               - QP/C++ library source code
 | | | +-qpcpp.h          - QP/C++ library header file
 | | | +-...              - QP/C++ library sources
 | | +-library.properties - QP/C++ library properties
 | |
 | +-qpn_avr/             - QP-nano library for AVR-based Arduinos
 | | +-examples/          - QP-nano library examples
 | | | +-blinky/          - Blinky example
 | | | | +-blinky.ino     - Blinky code (generated)
 | | | | +-blinky.qm      - Blinky model (for QM tool)
 | | | +-dpp/             - Dining Philosophers Problem (DPP)
 | | | | +-dpp.ino        - DPP code (generated)
 | | | | +-dpp.qm         - DPP model (for QM tool)
 | | | +-pelican/         - PEdestrian LIghtr CONtrolled crossing
 | | | | +-pelican.ino    - PELICAN code (generated)
 | | | | +-pelican.qm     - PELICAN model (for QM tool)
 | | +-src/               - QP-nano library source code
 | | | +-qpn.h            - QP-nano library header file
 | | | +-...              - QP-nano library sources
 | | +-library.properties - QP-nano library properties
 |
 +-README.md              - this file
 +-QP-Arduino-Playground  - web link to QP on Arduino Playground
 +-QP-Arduino_GPL_Exception.txt - GPL exception for QP on Arduino

Working with the Examples

Assumming that you have installed the QP libraries in your <Sketchbook> folder, the examples provided in each QP library show up in the Arduino IDE under the menu:

File|Examples|Examples from Custom Libraries

The intended way of working with the examples is to use the QM modeling tool to modify the models (.qm files) and then to generate code from these models. In this scenario, the Arduino IDE is used only to build and upload the code to the Arduino board(s).

NOTE: The preferences in the Arduino IDE should be set up to Use external editor so that the IDE will update the code each time it is re-generated by the QM modeling tool.


Example Documentation

Each example model has documentation, which you can view in the QM tool. The model documentation shows in the Property Editor when the model item is active.


Licensing

The QP real-time embedded frameworks for Arduino are licensed under the modified GPLv3 license with the QP-Arduino Exception (see also the file QP-Arduino_GPL_Exception.txt in the root of the archive). Specifically, the Exception removes the requirement to expose your propriatory source code as long as you deploy it on an Arduino-Certified board.

The QM model-based design tool is freeware. The QM tool is provided under the terms of a simple End-User License Agreement (EULA).


Companion Web Page

Please refer to the companion web page to this project at:

https://www.state-machine.com/arduino


Support Questions

Please submit any questions or comments to the free QP support forum at:

https://sourceforge.net/p/qpc/discussion/668726

You can’t perform that action at this time.