513 Commits

Author SHA1 Message Date
Abhishek Malik
84f402abd9 EL Driver: Removing Grove Dependency
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:16 -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
Jon Trulson
6d437c8007 ds18b20: Add a C implementation and inprove documentation
This commit adds a C implementation for the DS18B20.  The C++
implementation was untouched (ie: it does not wrap the C
implementation).  This can be done in the future if desired.

In addition, add an ascii-schematic to both the .h and .hpp files to
better illustrate how to wire up the DS 1-wire interface for the UART.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:09:15 -07:00
Jon Trulson
5088ee99e6 examples/c/CMakeLists.txt: make sure C examples link only with C libs
Previously, C examples were being linked with the C++ libs.  This
worked, since currently (until ds18b20) all C++ libraries with C
components simply wrapped the C componenets.

Now we make sure that only the C libs are ever linked with the C
examples.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:09:14 -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
Noel Eck
1b9b142b2e grove: Small changes to build grove library
* Removed relay and rotary from grove library
    * Removed relay and rotary from grove SWIG interfaces
    * Fixed warning for o2 printf %
    * Fixed return value warning for _get_normalized method used by
      my analog sensors.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:10 -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
Abhishek Malik
af417d3ae1 Fixing Build errors
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:08 -07:00
Abhishek Malik
3c51f638f1 A110X: Fixing Build error
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:07 -07:00
Abhishek Malik
d548fc62ab Examples: Added C Examples
Added examples for:
mq303a
m24lr64e
mpr121
servo
a110x
gp2y0a
ttp223
loudness
tsl2561

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-09-14 14:09:07 -07:00
Mihai Tudor Panu
67d01a9393 temperature: added C sources and removed grove dependency
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-14 14:09:03 -07:00
Noel Eck
878d89eee5 grove: Updated python/java/script tests for light and slide sensor.
Since these were split out from the grove lib, they need to load their
own library, ie Light now comes from upm_light.so.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:02 -07:00
Noel Eck
3ab74be66b grove: Updated java/script tests for light and slide sensor.
Since these were split out from the grove lib, they need to load their
own library, ie Light now comes from upm_light.so.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:01 -07:00
Noel Eck
e58c651b67 slide: Added slide potentiometer sensor C source
Added the C source for the flex sensor with necessary changes to cmake,
examples, and docs.

    * Renamed all files with groveslide to slide
    * Replaced all instances of groveslide with slide
    * Added C source for slide sensor
    * Updated all cmake files
    * Added C example for slide sensor
    * Split out slide sensor from grove library

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:01 -07:00
Noel Eck
e2bec11c23 flex: Added flex sensor C source
Added the C source for the flex sensor with necessary changes to cmake,
examples, and docs.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:00 -07:00
Noel Eck
bec533d8bd joystick12: Added 2 axis analog joystick12 C sensor
Added the C source for the joystick12 with necessary changes to cmake,
examples, and docs.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:09:00 -07:00
Noel Eck
b781405a95 ldt0028: Added piezo vibration sensor C source
Added the C source for the light sensor with necessary changes to cmake,
examples, docs.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:59 -07:00
Noel Eck
571f9c9498 light: Added light sensor C source
Added the C source for the light sensor with necessary changes to cmake,
examples, docs.

    * Renamed all files with grovelight to light
    * Replaced all instances of grovelight with light
    * Added C source for light sensor
    * Updated all cmake files
    * Added C example for light sensor
    * Split out light sensor from grove library

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:59 -07:00
Noel Eck
0e52ea619b gsr: Added gsr sensor C source
Added the C source for the gsr sensor with necessary changes to cmake,
examples, docs.

    * Renamed all files with grovegsr to gsr
    * Replaced all instances of grovegsr with gsr
    * Added C source for gsr sensor
    * Updated all cmake files
    * Added C example for gsr sensor
    * Fixed C++ threshold method from throwing on a successfull aio read

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:58 -07:00
Noel Eck
a19678948b emg: Added emg sensor C source
Added the C source for the emg sensor with necessary changes to cmake,
examples, docs.

    * Renamed all files with groveemg to emg
    * Replaced all instances of groveemg with emg
    * Added C source for emg sensor
    * Updated all cmake files
    * Added C example for emg sensor

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:58 -07:00
Noel Eck
f9878b3fe6 o2: Added O2 sensor C source
Added the C source for the O2 sensor with necessary changes to cmake,
examples, docs.

    * Renamed all files with groveo2 to o2
    * Replaced all instances of groveo2 with o2
    * Added C source for o2 sensor
    * Updated all cmake files
    * Added C example for o2 sensor

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:57 -07:00
Noel Eck
fe318a78d2 mqx: C gas sensors mq2-mq9
Implement a single source file for the following:

    * mq2: H2/LPG/CH4/CO/alcohol/smoke/propane/etc
    * mq3: Alcohol/benzine/CH4/hexane/LPG/CO
    * mq4: CNG (mostly methane)
    * mq5: H2/LPG/CH4/CO/alcohol
    * mq6: LPG (mostly propane/butane)
    * mq7: CO
    * mq8: H
    * mq9: CO/CH4/LPG

The documentation for these sensors notes that they do not read an exact
gas concentration.  Some of the sensors have examples for how to
calibrate with a 'clean air environment' for outputing ppm, but this is
not the case for all mqx sensors.  Because of this, the output can be
read as a normalized output (0.0->1.0), raw volts (normalized * aRef),
or a scaled/offset voltage.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:56 -07:00
Noel Eck
2b6dd5f3fd cmake: Cleanup of cmake messages.
* Removed unessesary spaces.
    * Changed INFO to STATUS since INFO is not a cmake message
      keyword.
    * Changed a few messages from status/info to warning.
    * Fixed trailing carriage return on yuidoc execute_process.
    * Removed my debug messages for CXX vs C.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:55 -07:00
Noel Eck
b608232cb9 vdiv: Added vdiv C source.
Multiple changes related to building the vdiv c source w/c example.

    * Renamed GroveVdiv to vdiv (all cases) throughout source, examples,
    directory names, and documentation.

    * Added C source.

    * Tested C sensor code on edison

    * Updated CMakeLists.txt for examples-c to build from
    <sensorname>-c.  This was a small change to get c examples to build
    for sensors in which the C++ does NOT wrap the C.

    * Added C example for vdiv.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:07:55 -07:00
Noel Eck
668aa320b9 dfrph_c_example: Fixed small copy/paste error
Removed urm37 string.  Re-aligned source.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:07:55 -07:00
Jon Trulson
dcb4e83251 dfrorp: Initial implementation
This module implements support for the DFRobot Analog ORP
(Oxidation/Reduction Potential) Meter.

It requires 5.0 volts, but the more accurate the voltage specified (to
the constructor), the more accurate the meter (paraphrased from the
wiki).

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:52 -07:00
Jon Trulson
21297e80d4 hka5: Initial implementation
This module implements support for the DFRobot Laser PM2.5 Sensor.  It
connects to a UART at 9600 baud.  This is the only baud rate
supported.  It optionally supports Reset and Set/Sleep gpios as well.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:50 -07:00
Jon Trulson
372b83fbed nmea_gps: remove incorrect comments in python examples
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:49 -07:00
Jon Trulson
4a8ddc10ad nmea_gps: add support for ubloc I2c reading of NMEA data
These changes allow NMEA data to be read via I2C on UBLOX compliant
devices that support this capability, such as the LEA-6H based GPS
shield from DFRobot.

It adds a new init() function to the C code, and a new constructor to
the C++ code. It also adds 5 new examples for C, C++, Javascript,
Python, and Java.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:49 -07:00
Jon Trulson
d456066277 ublox6: remove driver and replace with generic nmea_gps driver
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:48 -07:00
Jon Trulson
a040f51cda nmea_gps: renamed vk2828u7 to nmea_gps
This driver will serve as a generic module for grabbing NMEA data from
various GPS devices via a serial interface.  ublox6 will also be
removed in favor of using this driver going forward.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:48 -07:00
Jon Trulson
46460e20d9 urm37: Add C library for this sensor
Added a C implementation for this sensor.  The C++ library was changed
to just wrap the C library calls.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:47 -07:00
Jon Trulson
196654e7c6 bh1750: Initial implementation
This driver was developed with the DFRobot Light Sensor based on the
BH1750.  It has a sensitivity of .5 to 65535 Lux.  It supports
voltages from 3-5vdc and is connected via I2C.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:47 -07:00
Jon Trulson
d1aa4b62f2 mma7361: Initial implementation
This driver implements support for the DFRobot MMA7361 analog
accelerometer.  It supports 3 axes with a selectable 1.5G and 6G
sensitivity. It is not really meant for navigation, but rather for
uses such as orientation and freefall detection.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:46 -07:00
Jon Trulson
64e81def0f vk2828u7: Initial implementation
This module provides support for the VK2828U7 (ublox based) GPS module
from DFRobot.  It is connected via a UART, and emits NMEA data.

Ideally this data could be fed to an external library like TinyGPS to
parse the NMEA data and provide an easier method of extracting GPS
information.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-14 14:07:45 -07:00
Noel Eck
c1f9d15f67 upmc: Updates for building C modules w/base UPM
Test commit for building C UPM modules.

    * Added C include directory
    * Added C utilities directory
    * Rename C++ upm.h -> upm.hpp to make room for C upm.h
    * Added upm_mixed_module_init function to src/CMakeLists.txt.  This
      function takes filesnames similar to upm_module_init and does a
      bit of processing before calling upm_module_init.
    * Added c example directory.  Changed c++ example names.
    * Added dfrph implemention for testing (C++ wraps C).  Added mraa
      to .pc requires for dfrph.  Tested against stand-alone project.
      Added dfrph c example.
    * Update implemention of pkg-config file generation.
    * Added two cmake cache variables: BUILDCPP and BUILDFTI
    * Removed src from swig_add_module calls, added libname to
      swig_link_libraries calls.  Shrinks swig'ed binaries by ~13%.
    * Added install target in upm/CMakeLists.txt to install C header,
      directory.  Is this where we want this?
    * C FTI header directory is include/fti

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:07:44 -07:00
Mihai Tudor Panu
2583d0852d examples: removed jslint, jshint and global from javascript example files
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-08-31 13:25:09 -07:00
Jon Trulson
dc93fb11ff otp538u: some fixes to get working on the Arduino 101 with Firmata
There are some issues using this device on the 101 with Firmata:

1. You cannot use any other ADC resolution than 1024.  By default the
driver would try to set 12b resolution for improved accuracy.  Doing
this on the 101 yielded nonsensical readings causing the driver to
fail.  Using 10b resolution will yield less accuracy, but at least the
driver will function.

2. After the first ADC read, and for some time period after, the MRAA
aio_read() calls will always return 0.  This would cause an exception
to be thrown by the driver since this is an invalid reading.  Now, we
do an analog read on each channel and sleep for .5 seconds in the ctor
to get around this problem.  It is a hack and should be properly fixed
somewhere else (firmata?  MRAA?).

Some code was reworked/renamed to make it more clear what is actually
going on.  In addition a setDebug() method was added to enable some
debugging output.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-08-16 11:22:43 -06:00
Jon Trulson
06ecae7212 l3gd20: Add support for I2C connections
The existing driver only supported IIO.  This change adds support for
controlling the device via an I2C connection. In addition, there is a
new C++ example for it (l3gd20-i2c.cxx).

Note: Only basic functionality is supported, though a full register
map and access functions are available to fill in any desired
functionality.

Note, that some methods are only usable with specific connection
types.  See the documentation.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-08-09 16:03:42 -06:00
Henry Bruce
98e3621c93 ms5611: Initial implementation
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-08-04 17:12:10 -07:00
Mihai Tudor Panu
84a77730be examples: updated module names for some C++ examples
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-08-01 18:33:00 -07:00
Lay, Kuan Loon
e64f192fb7 apds9930: enable sensor before read out sensor data
Changes in library:
- enableProximity() function is to enable or disable proximity sensor
- enableIlluminance() function is to enable or disable illuminance sensor
- run clang-format

Changes in example:
- proximity and illuminance kernel IIO-based driver init state is power off,
  require enable before read out sensor data. Sleep time is needed after
  enable, the sleep time may vary on different platform.
- run clang-format

Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-07-22 16:30:25 -07:00
Jon Trulson
baec9966f0 spelling: correct many misspellings of celsius
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-07-12 17:42:01 -06:00