This driver was developed on a DFRobot CO2 sensor based on the MG811:
http://www.dfrobot.com/index.php?route=product/product&product_id=1023
It seems to *require* very precise calibration at 400ppm and 1000ppm
to be accurate. It also gets pretty hot (due to the heater) and
consumes significant current.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: sisinty sasmita patra <sisinty.s.patra@intel.com>
pca9685: fix problem where setting pwm accidentally cleared full bits
When setting the On or Off times, the FullOn or FullOff control bits
would be improperly masked and therefore not preserved.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Sisinty Sasmita Patra<sisinty.s.patra@intel.com>
adafruitms1438: fix a bug in PWM handling for DC motors
Eric Hubert reported a bug in that no matter what setting he used to
control the speed of a DC motor, it was always running at full speed.
There was a bug in the setMotorSpeed() method that did not clear the
'FullOn' bit in the register used for PWM, causing full power to be
applied all the time no matter the PWM duty cycle setting.
This patch corrects that issue.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
signed-off-by: Sisinty Sasmita Patra<sisinty.s.patra@intel.com>
We add a new src/upm_exception.i interface file for SWIG to catch
common exceptions and propagate them through SWIG.
src/upm.i is modified to include this interface file, so all UPM
drivers have it.
In theory, this should be language agnostic - if the target language
supports exceptions, then it should just work.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This driver supports the Sparkfun 64x48 pixel OLED Edison block:
https://www.sparkfun.com/products/13035
It is based on an ssd1306, but with some modifications (custom COM pin
mapping and a custom column offset). It uses SPI to communicate, and
since it is an Edison Block, you don't really have any options for
different bus and pin assignments.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Overload is unnecessary and SWIG can't handle overloads with the same number of arguments
thus it would break the js and py bindings
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
adafruitss: fix the period setting in setPWMFreq()
Tweak the fudge factor so it is more accurate for 50Hz and 60Hz periods. (Tested on Logic 4 and it is spot on now)
Get rid of compiler warnings when -Wall is set
Allow for float angle to be passed into the servo() method for more accurate positioning
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
lcd: lcm1602: modifications for eventual use as a base class for jhd1313m1
We add a new bool isExpander to the the I2C constructor. This allows
us (in the case we are not dealing with an expander) to just
initialize the i2c context only and bail in the constructor. The
default is true to preserve backward compatibility.
Additionally, add two new virtual protected methods, data() and
command() for sending data or commands to the controller. The default
implementation in lcm1602 will work for 4bit GPIO and expander use.
In the case of jhd1313m1, they will need to be redefined in that class
as the sematics for sending data and commands are different.
All of the underlying functionality will use command() or data() as
appropriate.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This module implements support for the LSM9DS0 accelerometer,
magnetometer, and gyroscope.
It was developed on the Sparkfun 9DOF sensor block for Intel Edison.
https://www.sparkfun.com/products/13033
Commonly used capabilities are supported, and methods/register
definitions exist to easily implement any desired functionality that
is missing. Interrupt support has also been added.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This driver has been rewritten from scratch. It is implemented as 3
seperate drivers now (but all included as part of the mpu9150 UPM
library):
AK8975 (Magnetometer)
MPU60X0 (Accelerometer, Gyroscope, and Temperature sensor)
MPU9150 (composed of AK8975 and MPU60X0)
Each driver can be used independently and includes examples in
C++/JS/Python.
Commonly used capabilities are supported, and methods/register
definitions exist to easily implement any desired functionality that
is missing. Interrupt support has also been added.
Scaling support has also been properly implemented for both the
Accelerometer and Gyroscope.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This driver was developed with a Sainsmart LCD Keypad Shield.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
lcm1602: add 4-bit gpio support with RS and Enable pins
In addition, move the command/data sending methods into the protected
block so that derived classes can use them if need be.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit removes the I2C context from the LCD base class and moves
it into each of the drivers.
In addition, the createChar() virtual function was removed from the
base class, as it directly used the now non-existant i2c context, and
it would not work on anything other than hd44780 based controllers and
displays anyway. Also, it is likely the capability itself, as well as
the data required to implement it, is going to be different from
device to device.
createChar() has been added to the Lcm1602 driver which can support it.
While doing this work, the LCD base class m_name is now set appropriately
in the driver constructors.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
We keep the same upm module library name (i2clcd), and the header
documentation still specifies @library i2clcd.
These will need to be changed when the actual library is renamed.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>