RaspberrPi project source code
guowenxue
2024-03-14 b3dc672c57aa5374fcd1ba1da5321d6c63d68e0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*********************************************************************************
 *      Copyright:  (C) 2023 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  tsl2561.h
 *    Description:  This file is the Lux sensor TSL2561 code
 *
 *        Version:  1.0.0(10/08/23)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "10/08/23 17:52:00"
 *
 * Pin connection:
 *               STH20 Module            Raspberry Pi Board
 *                   VCC      <----->      #Pin1(3.3V)
 *                   SDA0     <----->      #Pin27(SDA, BCM GPIO0)
 *                   SCL0     <----->      #Pin28(SCL, BCM GPIO1)
 *                   GND      <----->      GND
 *
 * /boot/config.txt:
 *                  dtoverlay=i2c0,pins_0_1
 *
 ********************************************************************************/
 
 
#ifndef  _TSL2561_H_
#define  _TSL2561_H_
 
#define TSL2561_I2CDEV                 "/dev/i2c-0"
#define TSL2561_I2CADDR                 0x39
 
extern int tsl2561_get_lux(float *lux);
 
#endif   /* ----- #ifndef _TSL2561_H_  ----- */