Edit on GitHub

[Pro] Blinky LED (C++) for Arduino

This is a simple example of how to use the C/C++ Domain together with an Arduino. C++ Timer are integrated. The underlying statechart looks as follows:

Arduino uno

Addons for compiling and flashing

For compiling and flashing the Eclipse C++ IDE for Arduino plugin has been used. This can be found at 'https://marketplace.eclipse.org/content/eclipse-c-ide-arduino'. Please ensure that you have installed the Arduino toolchain. This can easily be done by installing the Arduino IDE, which can be found here: 'https://www.arduino.cc/en/Main/Software'. It is not possible to compile code with the Eclipse C++ IDE for Arduino plugin without an installed toolchain!

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

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 installition has been finished.
  5. Ensure that you have downloaded the 'Arduino AVR Boards'. You need to add them via 'Help' -> 'Arduino Downloads Manager' -> 'Platforms' -> 'Add'

Using the Eclipse C++ IDE for Arduino plugin

After the installation you should notice a new Toolbar, which allows you to compile and flash your Arduino.
  1. First of all, your project should contain no errors any more.
  2. To get started you need to configure the desired platform. Choose your personal settings and board. Most of the Arduinos (Uno, Mega, etc.) should be supported. Plug in your Arduino and click on 'New Launch Target..'.
  3. Set up your device. This depends on your system and configuration.
  4. Build project.
  5. Upload the example.
  6. Your Arduino onboard LED should start blinking now!
Download examples

Drag to install

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

Back to overview