Luminosity sensor by Texas Advanced Optoelectronic Solutions Inc.. Device combines one broadband photodiode (visible plus infrared) and one infrared-responding photodiode. Sets Gain x1 and 402mS as default.
Dependents: MusicBoxForFathersDay FTHR_SensorHub Affich_Lum_Moist Projetv0 ... more
Diff: TSL2561.h
- Revision:
- 3:d60d8198d76d
- Parent:
- 2:17591031447b
- Child:
- 5:5b1b625fda6f
--- a/TSL2561.h Wed Aug 23 09:27:52 2017 +0000 +++ b/TSL2561.h Tue Feb 20 10:49:43 2018 +0000 @@ -3,11 +3,13 @@ * Luminosity sensor -- LIGHT-TO-DIGITAL CONVERTER (light intensity to a digital signal output) * TSL2561 by Texas Advanced Optoelectronic Solutions Inc. * - * Copyright (c) 2015,'17 Kenji Arai / JH1PJL + * Copyright (c) 2015,'17,'18 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: Feburary 21st, 2015 * Revised: August 23rd, 2017 + * Revised: Feburary 20th, 2018 bug fix -> read_ID() & who_am_i() + * Thanks PARK JAICHANG */ /* *---------------- REFERENCE ---------------------------------------------------------------------- @@ -52,8 +54,8 @@ #define TIMING_DEFAULT (TIMING_GAIN_1 + TIMING_TIME_402) ////////////// ID ///////////////////////////////////////// -#define I_AM_TSL2561 0x50 -#define REG_NO_MASK 0x0F +#define I_AM_TSL2561CS 0x01 +#define I_AM_TSL2561T_FN_CL 0x05 ////////////// COMMAND //////////////////////////////////// #define CMD_CMDMODE (1UL << 7) @@ -134,7 +136,7 @@ * @param none * @return ID + REVNO */ - uint16_t read_ID(void); + uint8_t read_ID(void); /** Power Up/Down * @param none