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>
* 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>
- 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>
* 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>
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>
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>
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>
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>
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>
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>
This commit provides a basic driver for the Vishay VEML6070 UV
Sensor. Some functionality might be missing. Binding examples have
not been tested as of now.
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
The 00B7 unicode character in 4 of the Java examples can cause warnings
(and possible errors) when compiling. Removed to minimize this risk.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Updated pom file generation: Generate pom files after all sensor
library targets have been created - allows for dependencies
* Changes for compiling on Android
* Check for mraa build options: Look at symbols in mraa library to
determine UPM build options (example: mraa_iio_init, mraa_firmata_init)
* Add per target summary for C/C++/java/nodejs/python
* Added hierarchy to fti include directory...
old: #include "upm_voltage.h"
new: #include "fti/upm_voltage.h"
* Removed unimplemented methods from mpu9150 library and java example
* Add utilities-c target for all c examples. Most of the C examples
rely on the upm_delay methods. Add a dependency on the utilities-c
target for all c examples.
* Updated the examples/CMakeLists.txt to add dependencies passed via
TARGETS to the target name parsed from the example name. Also updated
the interface example names to start with 'interfaces'.
* Updated src/examples/CMakeLists.txt to ALWAYS remove examples from the
example_src_list (moved this from end of function to beginning).
Signed-off-by: Noel Eck <noel.eck@intel.com>
There are a variety of LSM303 devices out there with various
incompatibilities and differing capabilities. The current lsm303
driver in UPM only supports the LSM303DLH variant, so it has been
renamed to lsm303dlh to avoid confusion and to make it clear which
variant is actually supported.
All examples and source files have been renamed, including header
files. In addition, the class name, LSM303, has been renamed to
LSM303DLH. No other functionality or behavior has been changed.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
C/C++ CMakeLists.txt lines are no longer needed - removed.
Converted bash script to a function to add some error checking.
Removed redundant author/copyright entry.
Signed-off-by: Noel Eck <noel.eck@intel.com>
This driver has been rewritten from scratch.
See docs/apichanges.md for a list of API compatibility changes
compared to the original driver.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This also provides some more functionality. get_raw() has been
deprecated in favor of using getNormalized().
Signed-off-by: Jon Trulson <jtrulson@ics.com>
The lcm1602 and jhd1313m1 drivers had been rewritten in C with a C++
wrapper some time ago, however the original lcm and jhd drivers were
still present in the lcd library. In addition, to avoid header file
conflicts, the new, separated lcm and jhd header files were renamed
with a .hxx prefix.
This patch:
- renames the new lcm1602/ and jhd1313m1/ header files to have the
usual .hpp prefix.
- removes the lcm1602, jhd1313m1, and sainsmartks drivers from the
lcd/ (i2clcd) library.
- fixes the examples to use the "new" libraries (lcm1602 and
jhd1313m1)
- changes the argument type for the createChar() (C++) to use a byte
vector (std::vector<uint8_t>) rather than a typedef'd char array.
The lcm1602_create_char() function (C) uses a standard char *. The
use of std::vector is well supported by SWIG.
- SWIG interface files changed to use upm_vectortypes.i, and removes
the carrays helpers, which should no longer be needed for these
drivers.
- removes the inclusion of the driver C .h header files into the SWIG
interface files - this should not be needed for these drivers.
- the sainsmartks driver will be placed into it's own new lcdks (LCD
Keypad Shield) library. This library should support the
SainsmartKS, DFRobot LCD Keypad Shield, and similar products from
other manufacturers in a future commit.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
The API has been changed in some cases - see the apichanges.md
document.
In addition, this driver uses a new upm_vectortypes.i SWIG interface
file to provide a mechanism for methods that return a vector of floats
and ints instead of a pointer to an array.
This works much nicer than C array pointers, and results in Python/JS/Java
code that looks much more "natural" to the language in use.
The Python, JS, and Java examples have been changed to use these
methods. Support for the "old" C-style pointer methods are still
provided for backward compatibility with existing code.
As an example - to retrieve the x, y, and z data for Euler Angles from
the bno055, the original python code would look something like:
...
x = sensorObj.new_floatp()
y = sensorObj.new_floatp()
z = sensorObj.new_floatp()
...
sensor.getEulerAngles(x, y, z)
...
print("Euler: Heading:", sensorObj.floatp_value(x), end=' ')
print(" Roll:", sensorObj.floatp_value(y), end=' ')
...
Now the equivalent code is simply:
floatData = sensor.getEulerAngles()
print("Euler: Heading:", floatData[0], ...
print(" Roll:", floatData[1], end=' ')
...
Additionally, interrupt handling for Java is now implemented
completely in the C++ header file now rather than the .cxx file, so no
special SWIG processing is required anymore. See Issue #518 .
Signed-off-by: Jon Trulson <jtrulson@ics.com>
The purpose of the templatesensor is to get contributors up and running
faster when adding a new sensor.
* Created library named 'sensortemplate'
* Added C++ source
* Added swig interface files for java, javascript, and python
* Added sensortemplate image file
* Added examples for c++, java, javascript, and python
* Updated contributions.md with steps to create a new sensor from
the sensortemplate library.
Signed-off-by: Noel Eck <noel.eck@intel.com>