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