GithubHelp home page GithubHelp logo

phoque6 / arduino_library_bh1745nuc_ambient_light_color_sensor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ncdcommunity/arduino_library_bh1745nuc_ambient_light_color_sensor

0.0 0.0 0.0 212 KB

BH1745NUC Ambient Light And Color Sensor Interfacing With Arduino

Home Page: https://store.ncd.io/product/bh1745nuc-digital-ambient-light-and-color-sensor-i2c-mini-module/

C++ 100.00%

arduino_library_bh1745nuc_ambient_light_color_sensor's Introduction

BH1745NUC

BH1745NUC

ROHM Semiconductor’s BH1745NUC is a 16-bit I2C digital color sensor that detects RGB (Red, Green, Blue) components and converts them into digital values. High sensitivity, wide detection range (0.005 to 40k lx), and excellent IR cut characteristics make it easy to accurately obtain the color temperature and brightness of ambient light. This Device is available from www.ncd.io

[SKU: BH1745NUC_I2CS]

(https://store.ncd.io/product/bh1745nuc-digital-ambient-light-and-color-sensor-i2c-mini-module/) This Sample code can be used with Arduino.

Hardware needed to interface BH1745NUC sensor with Arduino

  1. Arduino Nano

  2. Arduino Micro

  3. Arduino uno

  4. Arduino Due

  5. BH1745NUC Ambient Light and Color Sensor

  6. I2C Cable

BH1745NUC:

ROHM Semiconductor’s BH1745NUC is a 16-bit I2C digital color sensor that detects RGB (Red, Green, Blue) components and converts them into digital values. High sensitivity, wide detection range (0.005 to 40k lx), and excellent IR cut characteristics make it easy to accurately obtain the color temperature and brightness of ambient light.

Applications:

•LCD TV, Mobile phone, NOTE PC, Tablet PC, Portable game machine, Digital camera, Digital video camera,PDA, LCD display.

How to Use the BH1745NUC Arduino Library The BH1745NUC has a number of settings, which can be configured based on user requirements.The following commands sets the values in the registers as given in BH1745NUC datasheet.

1.Intial reset:The following command is used to set the initial reset bit as not started.

        Bit       TYPE          Description
         7         RW         0 : initial reset is not started
                              1 : initial reset is started
    
       bh.setSWReset(SW_RESET_NOT_START);                  // Initial reset is not started

2.Measurement time:The following command is used to set the measurement time bit as 160 msec.

       bh.setMeasTime(MEAS_TIME_160);                      // 000 : 160 msec

3.Valid:The following command is used to set the valid bit that RGBC data is updatad after last writing MODE_CONTROL1,2,3 register or last reading MODE_CONTROL2 register

       bh.setRGBCValid(RGBC_VALID_UPDATE);                 // RGBC data is updated after last writing MODE_CONTROL1,2 register or last reading MODE_CONTROL2 register

4.RGBC_EN:The following command is used to set the RGBC_EN bit that RGBC measurement is active.

       bh.setRGBCEnable(RGBC_EN_ACTIVE);                   // RGBC measurement is activebh.setRGBCEnable(RGBC_EN_ACTIVE);                   // RGBC measurement is active

5.ADC GAIN:The following command is used to set the gain of RGBC measurement as 1X.

       bh.setADCGain(ADC_GAIN_1X);                         // 00 : 1X

6.INT STATUS:The following command is used to set the INT STATUS of RGBC.

       bh.setINTStatus(STATUS_INACTIVE);                   // Interrupt signal is inactive

7.INT LATCH:The following command is used to set the INTERRUPT pin as latched until INTERRUPT register is read or initialized

        bh.setINTLatch(INT_LATCH_LATCHED);                  // INTERRUPT pin is latched until INTERRUPT register is read or initialized

8.INT ENABLE:The following command is used to set the INTERRUPT pin as disable.

        bh.setINTEnable(INT_ENABLE_DISABLE);                // INTERRUPT pin disable

9.PERSISTENCE:The following command is used to set the PERSISTENCE bit as Interrupt status is updated at each measurement end.

       bh.setPersistance(PERSISTENCE_UPDATED_EACH);        // Interrupt status is updated at each measurement end

arduino_library_bh1745nuc_ambient_light_color_sensor's People

Contributors

ryker1990 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.