Giter Site home page Giter Site logo

tcs34725's Introduction

npm Version GitHub package.json version CI GitHub Downloads Per Month GitHub last commit

TCS 34725

TAOS Color-light sensor.

This sensor provides and RGB plus intensity result. It can be accessed via the normal read process or via interrupts based on intensity thresholds. A wide range of setting and features are exposed by this library.

Adafruit of course

API

Tcs34725

Primary interface method for accessing the sensor and factory for creating class instances.

example usage:

const sensor = await Tcs34725.from(abus)
const color = await sensor.data()
static init

Pass and I2CBus compliant implementation as a parameter. Returns a instance of this class.

close

Closes the device and bus instance.

getId

Retrives the chips ID.

getProfile

Retrives full profile, including status, from the chip.

getStatus

Retrives status flag, including thresholdViolation and valid.

If thresholdViolation is true, then the chips clear channel has excided the

getThreshold

Retrives the current set thresholds for interrupts.

setThreshold

Sets new threshold values to be used for interrupt triggering.

setProfile

Set a new profile for the chip.

clearInterrupt

Manually clears the interrupt flag on the chip. Note that if conditions for the interrupt continue to exists, the chip will imidiatly re-assert the interrupt flag.

getData

Retrives rag data from the chip and performes RGBC convertions.

Interrupt

Interrupts are driven via a seperate Gpio driver (onoff is well tested). Though any mechanisme of detection is supported.

Once an interrupt has been raised, clear it via normal read methods. Note that it will continue to be rased if the alert condition persists.

Thresholds can be updated via the setThreshold call.

Interrupt state can also be manually cleared via clearInterrupt.

LED

Adafruit LED (breakout) supported also via gpio control. The onoff library can be used to control this features.

No specific code is needed via this library to support this external feature.

tcs34725's People

Contributors

dependabot[bot] avatar johntalton avatar

Stargazers

 avatar  avatar

Watchers

 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.