700 Commits

Author SHA1 Message Date
Mihai Tudor Panu
b08eef0197 2jciebu01: put new sources in right location
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-05 16:20:40 -07:00
Adelin Dobre
ef92026253 BNO055: Change parameter in example file
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:24:14 -07:00
mihais
32b73a1d25 Add string based constructor for Buzzer and an example to initialize it
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:16:06 -07:00
mihais
58ee51c767 Add string based constructors for UPM sensors
Signed-off-by: Mihai Stefanescu <mihai.stefanescu@rinftech.com>
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:56 -07:00
Serban Waltter
e4f106a0c7 Added iGas interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:45 -07:00
Serban Waltter
f28a6d2561 Added iMagnetometer interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:35 -07:00
Serban Waltter
aa966946d5 Added iGyroscope interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:24 -07:00
Serban Waltter
34bb12933d Removed old interfaces and replaced them with the new ones.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:13 -07:00
Serban Waltter
b6e53f7da8 Added bindings for iAcceleration sensors
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:01 -07:00
Serban Waltter
57c0c8c235 Removed commented code
Ran clang-format on modified files

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:14:26 -07:00
Serban Waltter
ddcc4f467e Removed using namespaces from interface examples
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:13:41 -07:00
Serban Waltter
c16b33ae31 Updated Java CMake and examples to comply with the new interfaces.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:13:32 -07:00
Serban Waltter
9669f226b9 Updated CMake interface examples.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:13:23 -07:00
Serban Waltter
2f0ae1cc49 Added bindings for iMotion and iPressure sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:13:06 -07:00
Serban Waltter
079e444fce Added bindings for iMoisture sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:12:57 -07:00
Serban Waltter
2405f933de Added bindings for iLight sensors.
Removed old interfaces C++ examples.

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:12:49 -07:00
Serban Waltter
c3d5d951e1 dded bindings for iHumidity sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:12:40 -07:00
Serban Waltter
bbcee52880 Added bindings for iHeartRate sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:12:31 -07:00
Serban Waltter
4addac7e01 Added bindings for iDistanceInterrupter sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:12:13 -07:00
Serban Waltter
52b3087de9 Added new interfaces bindings
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:11:55 -07:00
Mihai Stefanescu
f035470822 Added initial interfaces and some sensors implementing them
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:10:03 -07:00
Mihai Tudor Panu
94be00a63d java-examples: fix reported minor vulnerabilities
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-10-11 20:06:13 -07:00
Sumit Garg
6ae7e9125b examples: gcc8 fixes for -Werror=format-truncation
Fixes below issues:
tm1637.cxx:69:29: error: "%2d%02d" directive output may be truncated writing between 5 and 15 bytes into a destination of size 5 [-Werror=format-truncation=]
          snprintf(myTime, 5, "%2d%02d", (hour + timezone + 24) % 24, min);

jhd1313m1.c:65:49: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Werror=format-truncation=]
          snprintf(str, sizeof(str), "Hello World %d", ndx);

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-04 07:27:53 -07:00
Mihai Tudor Panu
89e2ec870a bh17xx: minor documentation and formatting updates, added rohm to vendor groups
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-10 10:24:50 -07:00
Assam Boudjelthia
4935a16530 BH1749: Add library blocks to headers, JSON format, and change SWIG JAVA vector type
- Add library blocks to header files
- Removed unneccessay new lines in JSON file
- Change SWIG Java floatVector to uint16Vector

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:40 -07:00
Assam Boudjelthia
9ef90ccb81 bh1749: Add examples for all languages
* Examples for C/C++/Python/Java/JavaScript
* Add Java example to CMakeLists

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:35 -07:00
Assam Boudjelthia
09208e90d0 BH1792: Add examples for all languages
- Examples for C/C++/Python/Java/JavaScript
- Add build line for java BH1792_Example

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:24 -07:00
Noel Eck
3e84b74bdf kxtj3: A few last-minute changes to the kxtj3 src
* Removed trailing whitespace
    * Fixed a few spelling errors
    * Switched to upm_delay_us for C source

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 10:33:38 -07:00
Assam Boudjelthia
186bbfab76 kxtj3: Add java/python/javascript examples
* Java/Python/Javascript examples
* change usleep to upm_delay_us in C++ example
* Add Java example to CMakeLists

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 10:04:36 -07:00
Assam Boudjelthia
01cc3a0734 kxtj3: fixed requested issues
* Virtual destructor
* Add header guards
* Constructor default values
* Remove methods with pointer parameters in C++ code

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 10:04:24 -07:00
Assam Boudjelthia
09e536b4ff kxtj3: C/C++ driver implementation with examples
Kionix tri-axis accelerometer sensor driver
* C implementation
* C++ wrapper
* C/C++ examples

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 09:59:37 -07:00
Noel Eck
3790c0bbc1 rsc.py: Added snippet to test rsc_regs.h types
Since UPM Travis-CI runs ctests (one of which loads python examples),
the added lines would fail if the RSC_DATA_RATE and RSC_MODE have not
been included in the python rsc module.)

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-08 14:14:47 -07:00
Noel Eck
306872619a examples: Remove double-backslash from install path
This commit removes the double-backslash when installing the examples.

Before:
   .../upm//examples/...

Before:
   .../upm/examples/...

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-04-16 10:42:23 -07:00
Antoine W. Campagna
54c6d294af kx122: Allow faster SPI bus frequency
The hardcoded frequency of 10kHz was much slower than the capacity of the device

Signed-off-by: Antoine W. Campagna <AntoineW@Campagna.org>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-30 09:58:06 -07:00
Noel Eck
83f541a5db Tsl2561_Example: Removed duplicate Tsl2561_Example
It appears that an additional tsl2561 Java example existed.
Removed the *newer* Tsl2561_Example.java in favor of the original
example.  Updated all corresponding collateral which references the
Tsl2561_Example.java file (CMake and library descriptor file).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-19 10:39:26 -07:00
Noel Eck
c54d6de054 JAVA: Unified Java Example names
Unified all Java examples to *match* <LIBRARY>[_otherstuf]_Example.java.
Note, a handful of the examples have a pseudo-random string for the
first component (see FlexSensor_Example.java, ideally this would be
Flex_Example.java).

This commit allows for quick development on a single sensor library
since a -DMODULE_LIST=mysensorlib now works with Java examples
(previously Java examples would fail generation when using
MODULE_LIST).

    * Renamed examples
    * Updated class names
    * Updated library descriptor .json files
    * Updated sample mapping file

TODO: Make this work like the C/C++ examples - grab the target library
name from the filename and grab all dependencies from that target
library.  Fix the handful of example names which don't conform.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-27 15:28:48 -08:00
Noel Eck
a43bcfe8d2 kx122: Add Java/Javascript/Python examples
Implemented a swig interface file for the kx122 and added corresponding
swig language examples.  Also added an STL vector flavor for getting
acceleration values from the kx122.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-26 14:36:06 -08:00
Noel Eck
1be36ec1df kx122: Small fix-ups for kx122 addition
A few small changes for the kx122 library.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-26 10:34:35 -08:00
Samuli Rissanen
2a17fe094e kx122: Added C and C++ examples
Signed-off-by: Samuli Rissanen <samuli.rissanen@hotmail.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-22 13:21:01 +02:00
Noel Eck
fe7bd75c91 C: Fixes for sign compares in C libraries
Added explicit error for sign compares to CMake.  Updated a handful of C
source which compared unsigned vs signed.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-07 14:29:35 -08:00
Noel Eck
3cfea676e2 lcd: Renamed 'i2clcd' library to 'lcd'
All other upm library directories match their corresponding library
name, the i2clcd was an outlier which caused problems for CMake and
testing.

    * Replaced usage of i2clcd with lcd
    * Renamed source files and examples
    * Updated examples to use correct class
    * Updated documentation where necessary (left changelog sections)

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-01-24 13:00:53 -08:00
Noel Eck
666452e873 SWIGJAVA: Remove the last JAVA ifdefs from src
Removed all references to #ifdef SWIGJAVA and JAVACALLBACK from the
library source.  All java-specific source code has been moved to the
corresponding library's .i file for java.

    * Update library source
    * Update examples where necessary
    * The function pointer methodology has been remove from libraries
      which provided callbacks as both a class and a function pointer
      implementation.  Examples were updated to use the class version
      of callbacks.
    * Updated documentation for SWIGJAVA

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-01-24 09:31:05 -08:00
Noel Eck
680649ba6f zfm20: Use mraa::Uart instead of tty
Updated the ZFM20 class to use UART functionality provided through the
mraa::Uart class instead of using the UART directly.

    * Switch to mraa::Uart
    * Added raw uart string constructor, closes #621
    * Updated examples
    * Added a common.i to minimize interface duplication
    * Removed pointers from C++ functions where references are
      preferable
    * Removed dependency on termios
    * Added typedefs to handle pass-by-reference
    * Removed flushes
    * Removed code after throws

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-01-23 15:51:54 -08:00
Alex Tereschenko
a842898bd5 lis3dh: add sensor support based on lis2ds12 module
Adding STMicro LIS3DH sensor support. This module is based on
the one for lis2ds12 (thanks, jontrulson!), but as sensors are
noticeably different, the contents underwent major rework.

Examples and basic API are left the same.

Tested on Intel Edison with Arduino board using both I2C and SPI.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-01-16 20:30:34 -08:00
Alex Tereschenko
82c8acf0fe examples/lis2ds12.py: fix comment typo
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-01-07 19:46:05 +01:00
Noel Eck
ac89a4a130 examples: Add install component for all examples
Provide the functionality to install all UPM examples to
DATADIR/upm/examples.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-11-16 12:07:00 -08:00
Noel Eck
18b8ca2633 examples/python: Add/update shebang line
Added/updated the shebang line on all python examples with:

Also chmod +x a few of the python examples.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-11-02 15:39:45 -07:00
Noel Eck
a96c607fb5 pyupm_led: Fixed example for led
This commit fixes issue 614.  Updated the example to use pyupm_led as
the module name (and skip the local module rename).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-11-02 14:52:41 -07:00
Abhishek Malik
6cc5c9691d Examples: Removing MRAA reference from examples
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-10-02 10:41:07 -07:00
Mihai Tudor Panu
e8aeaff162 curieimu: adding missing include for c++ example
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-09-27 16:52:24 -07:00