1572 Commits

Author SHA1 Message Date
Mihai Tudor Panu
1eafab7932 lsm9ds0: added constructor option to allow raw i2c bus init
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-12 14:01:45 -07:00
Mihai Tudor Panu
de986764d4 lcm1602: added backlight control and default bus/address for I2C variants
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-12 13:48:06 -07:00
Mihai Tudor Panu
3eda1bce16 cmake: set -march=native for ARM platforms
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-12 11:56:19 -07:00
Mihai Tudor Panu
72b975b6cc vcap: conditionally add target based on findJPEG result
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-11 15:50:56 -07:00
Mihai Tudor Panu
f850f5b7d8 buzzer: updated delay values for notes to match listed frequencies
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-11 14:09:53 -07:00
Abhishek Malik
8e8b35273b SWIG: Added uint8array typemap for zfm20 driver
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-05-09 22:35:13 -07:00
Charles Allen
dbb4f1749d [ST7735] Free pointers from spi.write
Docs for MRAA say ` The pointer return has to be free'd by the caller`

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 17:43:48 -07:00
Brendan Le Foll
05730dba68 cmake: add dependency on mraa v1.0.0
Merged conflict in grove.cxx GroveTemp::value where new
scale factor was added.  Changed to apply scale factor
post error-check.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 17:31:38 -07:00
Brendan Le Foll
48d5426350 i2c: use mraa 1.0 types for i2c sensors
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 17:13:36 -07:00
Brendan Le Foll
e51c5f3018 This is a combination of 2 commits.
aio: mraa_aio_read (v1.0.0) can now return -1, treat that in sensors using it

Adds alot of exceptions if the aio read goes wrong

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 17:13:35 -07:00
Noel Eck
f6816797bb bmp280: CMakeLists header variable name.
Missed one instance of module_h for the recent bmp changes.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 16:47:32 -07:00
Lay, Kuan Loon
cc5e3b2634 L3GD20: Enable L3GD20 3-axis digital gyroscope library and example
L3GD20 is tri-axis gyroscope from STMicroelectronics.
This sensor can measure angular velocity in degree per second.

The library provided is libupm-l3gd20.so.0.4.0.
The example provided is l3gd20-example where it will print x,y,z axis when
trigger buffer data is ready.

This sensor requires calibration to be done for 2 seconds. Please place the
sensor on level surface.

As the sensor data is noisy, we have implemented denoise algorithm within the
sensor library.

Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 16:34:26 -07:00
Lay, Kuan Loon
c3285ea523 kxcjk1013: code cleanup and update sensor description
Code cleanup and proper close iio device in destructor.

KXCJK-1013 is tri-axis accelerometer from Kionix.
This sensor can measure acceleration in metre per second squared or in
G-forces.

The library provided is libupm-kxcjk1013.so.0.4.0.
The example provided is kxcjk1013-example where it will print x,y,z axis when
trigger buffer data is ready.

Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
2016-05-09 16:32:05 -07:00
Jon Trulson
456bde0726 bno055: Initial implementation
This driver implements support for the Bosch BNO055 Absolute
Orientation 9DOF Fusion Hub.   It was implemented on the Adafruit
variant at https://www.adafruit.com/products/2472.

The BNO055 is a System in Package (SiP), integrating a triaxial 14-bit
accelerometer, a triaxial 16-bit gyroscope with a range of ±2000
degrees per second, a triaxial geomagnetic sensor and a 32-bit cortex
M0+ microcontroller running Bosch Sensortec sensor fusion software, in
a single package.

This sensor handles the hard problem of combining various sensor
information into a reliable measurement of sensor orientation (refered
to as 'sensor fusion').  The onboard MCU runs this software and can
provide fusion output in the form of Euler Angles, Quaternions, Linear
Acceleration, and Gravity Vectors in 3 axes.

The focus on this driver has been on supporting the fusion components.
Less support is available for use of this device as a generic
accelerometer, gyroscope and magnetometer, however enough
infrastructure is available to add any missing functionality.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:33:11 -07:00
Jon Trulson
d045dded7c java: add mraa to the java swig link line so mraa symbols can be found
Previously in MRAA, the libmraa library was statically linked into the
libmraajava library.  This was changed recently in MRAA, causing most
java examples to fail due to missing mraa symbols.  This patch
specifically adds libmraa to the link in addition to libmraajava.

In addition, use *_LIBRARIES in the java specific swig_link_libraries
call rather than *_LDFLAGS.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:53 -07:00
Jon Trulson
89d5ce152f adafruitms1438: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
dbbb30c3d2 vcap: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
8df446958a ozw: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
411b4abcb7 e50hx: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
7d64a67670 bacnetmstp: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
6b0a9c5272 hwxpxx: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:52 -07:00
Jon Trulson
12e1e6309e t3311: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:51 -07:00
Jon Trulson
c833c75cd3 h803x: remove extraneous libraries from swig_link_libraries() calls
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:51 -07:00
Jon Trulson
03354ccf9a interface examples: re-add bme280 support removed when old bme280 was removed
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:24:51 -07:00
Jon Trulson
6241e20dda bmp280, bme280: Initial implementation
This library adds support for both the BMP280 and BME280 sesnors from
Bosch.  The BME is virtually identical to the BMP280 aside from some
slight register changes and adding support for a humidity sensor.

The BMP280 is an absolute barometric pressure sensor especially
designed for mobile applications. The sensor module is housed in an
extremely compact 8-pin metal-lid LGA package with a footprint of only
2.0 × 2.5 mm2 and 0.95 mm package height. Its small dimensions and its
low power consumption of 2.7 μA @1Hz allow the implementation in
battery driven devices such as mobile phones, GPS modules or watches.

The BME280 is as combined digital humidity, pressure and temperature
sensor based on proven sensing principles. The sensor module is housed
in an extremely compact metal-lid LGA package with a footprint of only
2.5 × 2.5 mm2 with a height of 0.93 mm. Its small dimensions and its
low power consumption allow the implementation in battery driven
devices such as handsets, GPS modules or watches. The BME280 is
register and performance compatible to the Bosch Sensortec BMP280
digital pressure sensor

These drivers support both I2C and SPI operation.

When using SPI on an Edison with the arduino breakout board, you
must specify a CS of -1 to the constructor, and connect the chip's
CS pin to arduino pin 10.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:16:30 -07:00
Jon Trulson
84144d0c8f bosch bme280: Remove old driver in favor of new driver to be added soon
This driver, based on bosch code is being removed in favor of a new
driver to be added soon that is more fully functional and includes SPI
support.

The new driver will be included along with a BMP280 implementation in
a new bmp280 library.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:16:30 -07:00
Jon Trulson
dd2bca97b9 bmp180/bmpx0x: Remove old bmp180 driver
This commit removes the old bmp180 driver that was erroneously
re-added when the interface examples and headers were introduced.

It then switches the users of bmp180 to the existing bmpx8x driver,
which already supports the bmp180.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 13:13:42 -07:00
Mihai Tudor Panu
cf74a260a3 readme: updated introduction paragraph
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-06 14:18:10 -07:00
Mihai Tudor Panu
61f7803d92 grovetemp: added a scaling factor to allow adjusting ADC values
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-06 14:15:10 -07:00
Lay, Kuan Loon
e3b59eb05b apds9930: proper close iio device in destructor and update sensor description
Proper close iio device in destructor.

APDS-9930 is light and proximity sensor from Avago Technologies.
This sensor can measure ambient light in lux and proximity distance in 100mm.

The library provided is libupm-apds9930.so.0.4.0.
The example provided is apds9930-example where this app will print the value of
ambient light and proximity in every 1 second.

Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-05 11:37:56 -07:00
Lay, Kuan Loon
398d50de2e kxcjk1013: code cleanup and update sensor description
Code cleanup and proper close iio device in destructor.

KXCJK-1013 is tri-axis accelerometer from Kionix.
This sensor can measure acceleration in metre per second squared or in
G-forces.

The library provided is libupm-kxcjk1013.so.0.4.0.
The example provided is kxcjk1013-example where it will print x,y,z axis when
trigger buffer data is ready.

Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-05 11:06:36 -07:00
Noel Eck
bbb31fcab2 travis-ci: Fix for non-sticky clang env setting.
The env CC=clang builds were previously getting overridden for each build since
the language: cpp defaults gcc/g++ (travis-ci was not building UPM w/clang).
This commit explicitly adds the clang compiler to the build matrix.

    * Specify gcc/clang in the compiler directive

    * Add a node.js 0.10 entry

    * Add a few debug messages

    * General cleanup of .travis.yml

    * Add the upm make install step for completeness

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-04 13:05:19 -07:00
Noel Eck
5467620bf7 cpp_headers: Rename ds18b20 header .h -> .hpp
Renamed header file, updated header filename in interface files,
sources, and CMakeLists file.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-02 16:05:20 -07:00
Jon Trulson
e679d40d44 ds18b20: Initial implementation
This driver supports, and was tested with, a DS18B20 1-wire
Temperature Sensor using external power.

This device requires the use of a UART to provide access to a Dallas
1-wire bus, via a new facility supported by MRAA (once the relevant PR
is accepted), using the UartOW access class.  It is important to
realize that the UART is only being used to access and control a
Dallas 1-wire compliant bus, it is not actually a UART device.

Multiple DS18B20 devices can be connected to this bus.  This module
will identify all such devices connected, and allow you to access them
using an index starting at 0.

Parasitic power is not currently supported due to the very tight 10us
limit on switching a GPIO properly to supply power during certain
operations.  For this reason, you should use external power for your
sensors.

Setting the alarm values (Tl, Th) is also not supported, since this is
only useful when doing a 1-wire device search looking for devices in
an alarm state, a capability not yet supported in MRAA.  In reality,
this is trivial to handle yourself in your application.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-02 16:04:56 -07:00
Noel Eck
bf9059c846 cpp_headers: Rename ds2413 header .h -> .hpp
Renamed header file, updated header filename in interface files,
sources, and CmakeLists file.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-29 16:46:03 -07:00
Jon Trulson
e1bda1f44b ds2413: Initial implementation
This adds initial support for the DS2413 Dual Channel Addressable
Switch.  This is a Dallas Semiconductor 1-wire compliant device
providing access to 2 open-drain GPIOs.

https://learn.adafruit.com/adafruit-1-wire-gpio-breakout-ds2413/overview

This driver requires One-Wire over UART support in MRAA (PR #415)
which is not yet merged.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-04-29 16:37:30 -07:00
Abhishek Malik
893b35f77b Java: Added Examples for Sensors
max31855, max5487, maxds3231m, ecs1030 and sm130

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-04-29 11:07:10 -07:00
Noel Eck
a7e803873f docs: Updated porting documentation to reflect c++ header change.
Replaced module_h with module_hpp for example CMakeLists.txt
file.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-28 17:21:20 -07:00
Noel Eck
612f53ee40 examples: More header file renames
Missed 4 header file renames in C++ examples.  Fixing that
here.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-28 16:40:18 -07:00
Noel Eck
922e0cc26b cpp_headers: Renamed C++ headers from .h -> .hpp
To make room for UPM C and C++ sensor code to coexist, all UPM
C++ headers have been renamed from h -> hpp.  This commit contains
updates to documentation, includes, cmake collateral, examples, and
swig interface files.

    * Renamed all cxx/cpp header files which contain the string
    'copyright intel' from .h -> .hpp (if not already hpp).

    * Replaced all references to .h with .hpp in documentation,
    source files, cmake collateral, example code, and swig interface
    files.

    * Replaced cmake variable module_h with module_hpp.

    * Intentionally left upm.h since this file currently does not
    contain code (documentation only).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-28 14:00:54 -07:00
Jon Trulson
b3a8fd7172 eboled: change write_word to writeWord for MRAA 1.0 API change.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-28 13:17:20 -07:00
Mihai Tudor Panu
4455c81866 mic: fixed web link
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-25 10:54:16 -07:00
Noel Eck
6b273a1b49 docs: Added exclude to Doxyfile for boschdriver src.
The boschdriver.h file contains tags which are picked up by
doxygen and cause incorrect results.  For example, the
\mainpage and \license cause the Bosch header collateral to
be placed on the index.html page of the UPM docs.

Added an entry to EXCLUDE_PATTERNS which handles this.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-21 15:21:04 -07:00
Mihai Tudor Panu
d355f76226 upm: v0.6.2
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
v0.6.2
2016-04-19 16:42:19 -07:00
Jon Trulson
4f6be750c7 vcap: Initial implementation
This UPM module captures a still frame from a Linux V4L device, such
as a USB webcam, and and then allows you to save it as a JPEG image
into a file.

The camera and driver in use must support streaming, mmap-able buffers
and must provide data in YUYV format.  This should encompass most
video cameras out there.  It has been tested with a few off the shelf
USB cameras without any problems.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-19 15:38:48 -07:00
Mihai Tudor Panu
bf7d7d1bda examples: changed default bus from 6 to 0 for SSD1306 examples
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-18 16:27:11 -07:00
Mihai Tudor Panu
9acc752074 java: add dependency on java targets for java examples
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-15 10:01:55 -07:00
Mihai Tudor Panu
b6b7d892c2 cmake: fix RPM generation when VERSION_COMMIT is empty string
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-15 10:01:27 -07:00
Jon Trulson
1ca8d100ea e50hx: add bacnetmstp includes so example can build
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-15 10:01:02 -07:00
Jon Trulson
96f1afffe3 e50hx: remove add_dependency() call from CMakeLists.txt
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-15 10:00:38 -07:00