No Preview Available !
Free Datasheet http://www.nDatasheet.com
TSL2561 Luminosity Sensor
Created by Ladyada
Last updated on 2014-03-04 09:30:08 PM EST
Free Datasheet http://www.nDatasheet.com
Wiring the TSL2561 Sensor
This is an easy sensor to get started with. The breakout board comes with a 6-pin header strip
that you can use to plug the sensor into a breadboard or perfboard. Simply plug the header into
a solderless breadboard with the long pins down and short pins up. Place the sensor on top so
each pad has a header pin in it and solder the two together.
Next we will connect it to our microcontroller. In this case we'll be using an Arduino but nearly
any microcontroller can be used by adapting our code
Connect the VCC pin to a 3.3V power source. The sensor cannot be used with anything higher
than 3.3V so don't use a 5V supply! Connect GND to the ground pin.
Connect the i2c SCL clo ck pin to your i2c clock pin. On the classic Arduino
Uno/Duemilanove/Diecimila/etc this is Analo g pin #5
Connect the i2c SDA data pin to your i2c data pin. On the classic Arduino
Uno/Duemilanove/Diecimila/etc this is Analo g pin #4
Unfortunately, the i2c lines on most microcontrollers are fixed so you're going to have to stick
with those pins.
© Adafruit Industries
http://learn.adafruit.com/tsl2561
Page 5 of 13
Free Datasheet http://www.nDatasheet.com
uint16_t broadband = 0;
uint16_t infrared = 0;
/* Populate broadband and infrared with the latest values */
getLuminosity (&broadband, &infrared);
That's it! The example should be easy to understand and work into your own projects from
here!
© Adafruit Industries
http://learn.adafruit.com/tsl2561
Page 11 of 13