132 Commits

Author SHA1 Message Date
Jon Trulson
f61b615704 bmx055: remove bmg160, use new bmg160 library
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-03-30 16:43:35 -06:00
Jon Trulson
8dcd22794b bmg160: C port, FTI, C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-03-30 16:43:35 -06:00
Noel Eck
ccb9fa2a4f doc: Updated spelling occured -> occurred
Fixed small typo.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-03-20 14:26:50 -07:00
Jon Trulson
54a84af1c3 light: modify so C++ wraps C code
This also provides some more functionality.  get_raw() has been
deprecated in favor of using getNormalized().

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-03-17 16:24:15 -06:00
Jon Trulson
ab171573f9 lcd/lcm1602/jhd1313m1: remove lcm1602 and jhd1313m1 from lcd library
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>
2017-03-16 12:39:52 -06:00
Noel Eck
58cdfadf4e p9813: Chainable LEDS
Initial commit of the p9813 chainable LED controller.
Added C, C++, python, java, and node examples.

Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-03-08 09:46:43 -08:00
Jon Trulson
d4b536b593 bno055: C port; C++ wraps C
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>
2017-03-07 13:16:24 -07:00
Noel Eck
b7faba556f sensortemplate: Added a template sensor
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>
2017-03-02 23:05:51 -08:00
sisinty sasmita patra
1f18369fbe SWIG_JAVA: C++ Interfaces to Java interfaces, Modified one Java Example
This commit translates C++ interfaces to Java interfaces, previously C++ Interfaces implemented java classes.

    * Added java swig interface files for all C++ interfaces to simplify swig
    javaupm_iADC.i
    javaupm_iCO2Sensor.i
    javaupm_iHumiditySensor.i
    javaupm_iLightController.i
    javaupm_iLightSensor.i
    javaupm_iModuleStatus.i
    javaupm_interfaces.i
    javaupm_iPressureSensor.i
    javaupm_iTemperatureSensor.i

    <example Usage>
        %include"../interfaces/javaupm_iADC.i"

    * Modified swig interface files for few sensors that implements interfaces
    ads1x15
    bmp280
    bmpx8x
    ds1808lc
    hlg150h
    lp8860
    max44009
    ms5611
    si1132
    si7005
    t6713

    * Removed few methods that were mentioned Protected and made them public, so that menthods can be overridden

    * Made IModuleStatus virtual to avoid ambiguity in multiple inheritance
    For example
    class A {};
    class B : public A {};
    class C : public A {};
    class D : public B, public C {};

    This can be solved as
    class A {};
    class B : virtual public A {};
    class C : virtual public A {};
    class D : public B, public C {};

    * Modified java interface files to support multiple swig versions

    * Modified javaupm interface file to support standard auto load library code

    * Fixed autoloadlibrary tests for interfaces

    * Created one interface example separately <BME280_InterfaceExample.java>,
    <example Usage>
        BME280_InterfaceExample.java
    since we cann't define swig versions inside java example file.
    So, instaed added swig versions in Cmake.
    <example Usage>
         if (SWIG_VERSION VERSION_GREATER 3.0.8)
           add_example_with_path(BME280_InterfaceExample bmp280 bmp280)
         endif()

Signed-off-by: sisinty sasmita patra <sisinty.s.patra@intel.com>
2017-03-02 20:14:03 -08:00
Mihai Tudor Panu
dbac88d225 ads1x15: extend examples for both ads1015 and ads1115 and clarify which one is used where
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-09 15:11:59 -08:00
Jon Trulson
dac31a0347 speaker: Add pwm functionality and 5 new examples to demonstrate
These changes add the ability to intialize a speaker instance to use a
PWM pin instead of a standard GPIO pin in order to emit sounds.

The current GPIO functionality is fairly constrained by the
implementation -- it only permits playing cerain hardcoded "notes".

The PWM support allows one to emit specific frequencies (currently
between 50-32Khz) using a PWM pin.  Of course, you may still be
constrained by the limits of your PWM hardware in the end.

There are a few new functions provided to support this PWM mode.  To
use the PWM mode of speaker, use the speaker_init_pwm() initialization
routine instead of speaker_init() (for C). For C++ and the SWIG
languages, pass "true" as the second argument to the constructor to
enable PWM mode.  The default is "false", to match current default
behavior (GPIO).

Functions that are not related to a given mode (GPIO vs. PWM) will do
nothing if not usable in that mode.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-01 17:08:05 -07:00
Jon Trulson
0749f130e1 nunchuck: C port; FTI; C++ wraps C
Some API changes were made as well, see docs/apichanges.md.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-31 13:08:20 -07:00
Jon Trulson
1bbb9386b7 enc03r: C port; FTI; C++ wraps C
The API for this driver has changed.  See docs/apichanges.md.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-30 12:06:32 -07:00
Jon Trulson
849711c47d wfs: C port; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-26 15:13:01 -07:00
Jon Trulson
e8151640a1 uartat, le910: initial implementation.
uartat is the underlying UART driver, specifically for use with
AT-style command driven devices like modems.

The le910 support is provided in the form of examples that make use
of the uartat driver to interact with the device.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-24 14:02:03 -07:00
Noel Eck
bd47b9ed45 max30100: Initial commit - MAX30100 pulse oximeter
* c/c++ source
    * java/js/python/c/c++ examples
    * Doc image (png)
    * Tested on Intel Edison
    * TODO: Tuning for SpO2 reading

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-01-10 11:29:30 -08:00
Mihai Tudor Panu
0849fbc674 ads1x15: added elaborate examples for TI ADS1015 ADC
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-01-05 21:20:58 -08:00
Jon Trulson
fcb4d9d36d mcp2515: Initial implementation; C; C++
The mcp2515 is a CAN bus controller.  It was developed using the Seeed
CAN bus shield.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-20 12:17:14 -07:00
Jon Trulson
6667646d32 mb704x: Initial implementation; C; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-02 16:44:43 -07:00
Noel Eck
929244b27a ims: Fixed IMS java example
* Fixed a compile issue for the JAVA example
    * Added C header to swig java/js interface files

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-29 09:56:57 -08:00
Noel Eck
9a4f0cae0c ims: Added FTI and java example
* Added compiling FTI for IMS
    * Updated JAVA example, added to CMakeLists.txt

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-29 08:51:45 -08:00
Jon Trulson
ad275e1d41 ecezo: initial implementation; C, C++; FTI + examples
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-11-28 17:45:23 -07:00
Noel Eck
971cb4ab51 ims: Initial turnin of I2C Moisture Sensor
* Added C library
    * Added CXX library
    * Added C/CXX/java/js/python examples

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-21 14:57:15 -08:00
Jon Trulson
803f9a9838 ms5803: initial implementation; C, C++; FTI + examples
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-11-14 17:26:42 -07:00
Jon Trulson
3eb3a0b825 guvas12d: C implementation; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-11-04 12:52:33 -06:00
Jon Trulson
1f954a8cbf ppd42ns: C implementation; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-11-02 17:51:05 -06:00
Jon Trulson
7b9fbd8738 buzzer: C implementation; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-28 16:48:53 -06:00
Jon Trulson
c09ab37a59 mma7660: C implementation; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-27 15:13:20 -06:00
Jon Trulson
58dfa9d95a uln200xa: C implementation and examples
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-24 16:05:39 -06:00
Jon Trulson
8ac8be9e0a md: C implementation; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-18 17:04:50 -06:00
Jon Trulson
239ab49d6b sht1x: Initial implementation
This driver was developed with a DFRobot SHT10 Temperature and Humidity
sensor.  This driver should work on all SHT1X devices.

It requires a 10K pull-up resistor connected to the data pin.
The sensor can be run at differing voltages from 2.5v to 5v.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-16 16:52:49 -06:00
Sisinty Sasmita Patra
8bdb917c40 MD: Adding missing files
Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:27 -07:00
Sisinty Sasmita Patra
2970d21ddd MD: Created MD from GroveMD
Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:27 -07:00
Abhishek Malik
ac5e54cfb6 LineFinder: Created LineFinder from GroveLineFinder
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:26 -07:00
Sisinty Sasmita Patra
b65908ea24 WFS: Added water flow sensor without grove dependency
Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:24 -07:00
Abhishek Malik
81e4eb07bf Fixing build errors
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:24 -07:00
Abhishek Malik
ea4b1b6aa7 Grove: Reverted examples and Sources
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:23 -07:00
Sisinty Sasmita Patra
b1918f61de SCAM: Added Serial camera without grove dependency
Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:22 -07:00
Sisinty Sasmita Patra
982065a7b7 Speaker: Removed grove dependency
* Renamed all files from grovespeaker to speaker
    * Replaced all instances of grovespeaker with speaker
    * Updated all CMake files
2016-09-14 14:09:20 -07:00
Sisinty Sasmita Patra
ddab71e896 Water: Removed grove dependency
* Renamed all files from grovewater to water
    * Replaced all instances of grovewater with water
    * Updated all CMake files

Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:18 -07:00
Sisinty Sasmita Patra
3753a1be5c Button: Removed grove dependency
* Renamed all files from groverrotary to rotary
    * Replaced all instances of groverrotary with rotary
    * Updated all CMake files

Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:16 -07:00
Jon Trulson
6a6a572069 dfrec: Initial implementation
This module implements support for the DFRobot EC (Electrical
Conductivity) meter.  It relies on the use of the DS18B20 UPM C module
for temperature gathering.

It has a pretty complicated calibration procedure which is somewhat
documented on the DFRobot wiki.  Functions have been added to support
changing the various coefficients as desired.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:09:15 -07:00
Abhishek Malik
a08b8bbcb0 EHR: Removed Grove dependency
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:13 -07:00
Abhishek Malik
f9a36314fb LED: Added C Src and Example
Changed from Grove LED to LED.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:13 -07:00
Abhishek Malik
1caf805d2b Moisture: Add C Src and Example
Changed from GroveMoisture.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:12 -07:00
Abhishek Malik
0f7bb5573c Collision: Added C Src and Example
This module was initially known as GroveCollision. It has been
now changed to Collision. C source and examples added.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:12 -07:00
Noel Eck
2a63e97533 rotary_relay: Updated java examples
* Changed module from upm_grove to upm_relay/rotary.
    * Updated java examples cmake from upm_grove to upm_relay/rotary.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:11 -07:00
Noel Eck
50ec3a018f rotary_relay: Updated java examples
Changed module from upm_grove to upm_relay/rotary.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:11 -07:00
Sisinty Sasmita Patra
bded0a07d9 Rotary: Added C source
Added C source for rotary angle sensor

    * Renamed all files from groverrotary to rotary
    * Replaced all instances of groverrotary with rotary
    * Added C source for rotary angle sensor
    * Updated all CMake files

Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:09 -07:00
Sisinty Sasmita Patra
b266f87450 Relay: Added C source
Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
2016-09-14 14:09:09 -07:00