Code Monkey home page Code Monkey logo

esp32-tsl2561-example's Introduction

esp32-tsl2561-example

Platform: ESP-IDF Build Status license

Introduction

This is an example application for the TAOS TSL2561 Light-to-Digital Converter device.

It is written and tested for v3.3 of the ESP-IDF environment, using the xtensa-esp32-elf toolchain (gcc version 5.2.0).

Ensure that submodules are cloned:

$ git clone --recursive https://github.com/DavidAntliff/esp32-tsl2561-example.git

Build the application with:

$ cd esp32-tsl2561-example.git
$ idf.py menuconfig    # set your serial configuration and the I2C GPIO - see below
$ idf.py -p (PORT) flash monitor

The program should detect your connected device and periodically obtain a light reading from it, displaying it on the console.

Dependencies

This application makes use of the following components (included as submodules):

Hardware

To run this example, connect one TSL2561 device to two GPIOs on the ESP32 (I2C SDA and SCL). If external pull-up resistors are not provided with the sensor, add a 10 KOhm resistor from each GPIO to the 3.3V supply.

idf.py menuconfig can be used to set the I2C GPIOs and TSL2561 device I2C address.

The TSL2561 can be set to one of three I2C addresses depending on the connection state of the ADDR SEL pin:

  • If ADDR SEL is tied to ground, the address is 0x29.
  • If ADDR SEL is floating (not connected), the address is 0x39.
  • If ADDR SEL is tied to VCC (3.3V), the address is 0x49.

Features

This example provides:

  • Visible, InfraRed and Full Spectrum light level measurements.
  • Lux calculation .
  • Compile-time selection of integration time and gain.

Source Code

The source is available from GitHub.

License

The code in this project is licensed under the MIT license - see LICENSE for details.

Links

Acknowledgements

"I2C" is a registered trademark of Phillips Corporation.

"SMBus" is a trademark of Intel Corporation.

esp32-tsl2561-example's People

Contributors

davidantliff avatar

Stargazers

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