[riot-notifications] [RIOT-OS/RIOT] sys/arduino: use Arduino libraries (#12180)

Gunar Schorcht notifications at github.com
Mon Sep 9 02:20:26 CEST 2019

### Contribution description

This PR allows the use of an Arduino library in RIOT applications without the need for an Arduino sketch. For this purpose it introduces a new pseudomodule `arduino_lib`. This pseudomodule enables implicitly module `arduino` but avoids that a sketch is required or generated and compiled. Thus, it becomes possible just to compile and use a package or a directory with some source files from an Arduino library in RIOT applications without having an Arduino sketch.

The test app demonstrates how to import and use an Arduino library as packages using a very simple Arduino library for on-board LED flashing sequences. For this purpose, the PR contains the package `talking_leds`.

In addition, this PR introduces the Arduino standard header file `Arduino.h` and the data types `boolean` and `byte` to improvethe compatibility of `sys/arduino` with Arduino libraries and applications.

### Testing procedure

Compile and flash `tests/arduino_lin`:

make -C tests/arduino_lib/ BOARD=... flash
The integrated LED should flash in a loop twice short and twice long.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sys/arduino: add Arduino.h for compatibility
  * sys/arduino: add type definitions often used
  * sys/arduino: compilation of Arduino libraries
  * tests/arduino_lib: demo the use of Arduino library

-- File Changes --

    M Makefile.dep (4)
    M makefiles/pseudomodules.inc.mk (1)
    A pkg/talking_leds/Makefile (11)
    A pkg/talking_leds/Makefile.include (3)
    A pkg/talking_leds/Makefile.talking_leds (3)
    A pkg/talking_leds/doc.txt (6)
    M sys/arduino/Makefile.include (20)
    A sys/arduino/include/Arduino.h (33)
    M sys/arduino/include/arduino.hpp (17)
    A tests/arduino_lib/Makefile (9)
    A tests/arduino_lib/README.md (8)
    A tests/arduino_lib/main.cpp (41)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190908/f1e58fd7/attachment.htm>

More information about the notifications mailing list