Read TSL2561 through Python3 on raspberry pi
Project description
GreenPonik_TSL2561.py Library for Raspberry pi
This is the sample code for read light with TSL2561 sensor.
Table of Contents
- GreenPonik_TSL2561.py Library for Raspberry pi
- Table of Contents
- Installation
- Methods
- Examples
- Credits
Installation
> git clone https://github.com/GreenPonik/GreenPonik_TSL2561.git
cd GreenPonik_TSL2561
pip3 install -r requirements.txt
or
> pip3 install greenponik-tsl2561
from GreenPonik_TSL2561 import GreenPonik_TSL2561
Methods
"""
Get light data
"""
def read_tsl2561():
Example
import time
from GreenPonik_TSL2561 import GreenPonik_TSL2561
if __name__ == "__main__":
tsl = GreenPonik_TSL2561()
while True:
data = tsl.read_tsl2561()
print(data)
time.sleep(1)
Credits
Write by Mickael Lehoux, from GreenPonik, 2019
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
greenponik-tsl2561-0.0.2.tar.gz
(162.5 kB
view hashes)
Built Distribution
Close
Hashes for greenponik_tsl2561-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b4e5df45e3e9f4e9dede70401eb82648930a177c64b18ec908fadb2706e766d |
|
MD5 | 652ab0ef3b73b450b9f6e2a01f332dad |
|
BLAKE2b-256 | 415a7ecb06bdf8aaa66c4e21185d4c1a1d4e1052ac51db9494f66536dc9f3463 |