Edit on GitHub

Zowi (C++)

This is a example of how to use the C/C++ Domain together with the Zowi by BQ, which is based on an Arduino Uno. C++ Timers are integrated.

ZowiStatechart

The statechart contains four states. Firstly, the Zowi will be initialized. After this, Zowi is awake and tries to walk a circle. If maximum amount of rounds is reached he will wait for some noise. If something is in his way he will detect it and stop walking. The underlying statechart looks like the following:

ZowiStatechart

Addons for compiling and flashing

For compiling and flashing the Eclipse C++ IDE for Arduino plugin has been used. This can be found at the Eclipse Marketplace''.

How to install the Eclipse C++ IDE for Arduino plugin

There are the following two ways of installing:

(Recommended) Auto-Install of all Dependencies

The following instructions show a simple way of installing the Dependencies via an integrated wizard.
  1. Click on 'File' -> 'New' -> 'Example...' -> 'YAKINDU SCT' -> 'YAKINDU Statechart Examples' and then 'Next >'.
  2. Search for 'Embedded Systems' -> 'Zowi (Deep C++)' and click the button on the top right called 'Install Dependencies...'
  3. Click through the wizard until you are finished.

(Alternative) Manual installation of all Dependencies

This instructions shows step by step of how to install the plugin.

  1. Click on 'Help' -> 'Install New Software..' -> 'Add...'.
  2. Define a name and add 'http://download.eclipse.org/tools/cdt/releases/9.3' as location. Notice that this update site could be outdated. The current update site can be found on the marketplace.
  3. Use the filter and type 'Arduino C++ Tools'. Choose this feature and click on 'Next..'. Follow installation instructions.
  4. The installation dialog will ask you for a restart. After this restart is done, the installation has been finished.

Download the required platform and libraries

At first the required platform and libraries have to be installed:

  1. Click on 'Help' ->'Arduino Download Manager'.
  2. In the 'Platforms' tab, install the 'arduino' package named 'Arduino AVR Boards'. In this example version 1.6.23 has been used.
  3. In the 'Libraries' tab, install the 'Servo' library, which can be found under 'Device Control'. In this example version 1.1.3 has been used.

Add the required platform and libraries

Then it's required to add the libraries to the project

  1. Right click the Zowi example propject and click on 'Properties'.
  2. Open the libraries tab and add 'Servo' and 'EEPROM'. This is shown on the following figure:
  3. ZowiStatechart

Compile and flash

At least the 'Launch Configuration' needs to be configured:

  1. Plug in the Zowi and click on 'New Launch Target..'. This can be found in the upper left corner by clicking on the menu 'on:'.
  2. BuildHammer
  3. Name: Choose a name
  4. Port: Choose the port
  5. Board Type: Arduino/Genuino Uno
  6. Programmer: AVR ISP
  7. Click on 'Finish'
  8. Press the button BuildHammer at the Top left to build the Project.
  9. Press the button RunArrow at the Top left to run the Project on the Zowi.

After this you are done and your Zowi should start moving!

Download examples

Drag to install

Drag to your running YAKINDU Statechart Tools (min. version 2.8.0) workspace.

Back to overview