Git Product home page Git Product logo

isl29125_softwire's Introduction

Modded Arduino Library for SparkFun ISL29125 Breakout

ISL29125 Breakout
RGB Light Sensor Breakout-ISL29125 (SEN-12829)

Modified code for the ISL29125 RGB Light Sensor. Based on ISL29125_Breakout.

I needed to use multiple ISL29125 sensors at once. They use the same address, which is hardwired and cannot be changed. I decided to use the same approach that Fire7 used for the Adafruit TCS34725 Color Sensor.

Using this library, you initialize ISL29125 giving it two pins that are used for software SDA and SCL:

// Declare sensor object
static int SDA = 2;
static int SCL = 3;
ISL29125_SOFT RGB_sensor;
RGB_sensor.init(SDA,SCL);

So, if you want to use multiple sensors, you can just use different pins:

// Declare sensor objects

RGB_sensor_1.init(2,3);
RGB_sensor_2.init(4,5);
RGB_sensor_3.init(6,7);
RGB_sensor_4.init(8,9);

And then read them as usual:

RGB_sensor_1.readRed();
RGB_sensor_2.readRed();
...etc.

Repository Contents

  • /examples - Example sketches for the library (.ino). Run these from the Arduino IDE.
  • /src - Source files for the library (.cpp, .h).
  • library.properties - General library properties for the Arduino package manager.

Documentation

License Information

This product is open source!

The code is beerware; if you see me at the local, and you've found this code helpful, please buy me a round!

Please use, reuse, and modify these files as you see fit. Please maintain attribution to Christos Koutsouradis and SparkFun Electronics and release anything derivative under the same license.

Distributed as-is; no warranty is given.

isl29125_softwire's People

Contributors

christosku avatar

Stargazers

Romain avatar

Watchers

James Cloos avatar  avatar

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.