Giter Club home page Giter Club logo

ilib's Introduction

I2C-Sensor-Lib (iLib)

Compile Examples

Library for I2C sensors and some atmel-specific functions. The following sensors can be used with an uniform interface and come with arduino-examples:

  • Austria Microsystems TCS3772: light sensor - RGB and clear
  • Silicon Labs SI7021: humidity sensor
  • Invensense MPU9250: 9DOF - 3 axis acceleration and gyro PLUS AK8963-IC with magnetic-field sensor
  • Freescale MPL3115A2: pressure
  • Maxim MAX44009: ambient and lux with incredible wide dynamic
  • NXP PCF2127: Realtime-Clock with 2ppm
  • Bosch BMP280: pressure
  • ST L3G-Series: 3 axis gyro / angular rate
  • Freescale MAG3110: 3 axis Compass / Magnetic field
  • Freescale MMA8451: 3 axis acceleration
  • Fairchild FAN5421: Single-Cell Li-Ion Switching Charger
  • STM LPS331: Pressure Sensor
  • Maxim MAX17047: Fuel Gauge for various Cells

Additional Features:

  • AVR: measure VCC of the power-pin
  • AVR: emulate a spektrum-serial control
  • fast math fn for e-function, power-of with scaling (interpolation with sampling points)
  • HDLC: a protocol for serial communication featuring frames, checksum and auto-escaping of characters
  • WS2812B: efficient controller

ilib's People

Contributors

aentinger avatar ivankravets avatar jthomaschewski avatar orgua avatar pgollor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ilib's Issues

Support for Bosch BME-280

Hello,

Congratulations for your very useful library! I would like to ask if you are planning to add support for the BME280 sensor?

Thanks,

The Wire.endTransmission after Wire.requestFrom is not needed.

In the file "i2c.h" in the function "read" is a Wire.endTransmission at the end, after a Wire.requestFrom.
That last Wire.endTransmission can be deleted, since Wire.requestFrom should not be followed by a Wire.endTransmission.

The Wire.beginTransmission and Wire.endTransmission are only used when writing data.

Working with ESP8266 based boards

I found your library from this (https://www.best-microcontroller-projects.com/bmp280.html) article and have found it to be perfect for my needs. However, it did not work on my chosen micro controller as-is. Some of the dependencies must be different when using ESP8266 based micro controllers. For my use, I have made the following changes that seem to be working for me. Since these changes are to one of you base classes, I don't know if there are any ramifications that should be noted.

`WirePlus::WirePlus()
{
Wire.begin(); // I2C as Master

#ifdef ESP8266
// DEC - TODO: I've added this as PORTC, TWBR were undefined
// when using on ESP8266 board. Arduino.cc pages state
// that PORTC has to do with analog pins. Why would this
// digital port library need to change these? Need to
// figure this out.
Wire.setClock(400000L);
#else
bitSet(PORTC, 4); // deactivate internal pull-ups for twi
bitSet(PORTC, 5); // as per note from atmega8 manual pg167
// switch to 400KHz I2C - eheheh
TWBR = ((F_CPU / 400000L) - 16) / 2; // see twi_init in Wire/utility/twi.c
#endif // ESP8266

};
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.