Skip to content

Commit e7b5cfe

Browse files
committed
Initial upload
0 parents  commit e7b5cfe

File tree

8 files changed

+732
-0
lines changed

8 files changed

+732
-0
lines changed

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Software License Agreement (BSD License)
2+
3+
Copyright (c) 2012, Adafruit Industries
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
3. Neither the name of the copyright holders nor the
14+
names of its contributors may be used to endorse or promote products
15+
derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
18+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
21+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Deneyap UV Light Sensor LTR390 Library
2+
[FOR TURKISH VERSION](docs/README_tr.md) ![trflag](https://github.com/deneyapkart/deneyapkart-arduino-core/blob/master/docs/tr.png)
3+
4+
***** Add photo ****
5+
6+
Arduino library for Deneyap UV Light Sensor LTR390
7+
8+
## Specifications
9+
- `Product ID` **M41** ,**mpv1.0**
10+
- `MCU` LTR390
11+
- `Weight`
12+
- `Module Dimension`
13+
- `I2C address` 0x53
14+
15+
| Address | |
16+
| :--- | :--- |
17+
| 0x53 | default address |
18+
19+
## :closed_book:Documentation
20+
Deneyap UV Light Sensor
21+
22+
[LTR390 datasheet](https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf)
23+
24+
[How to install a Arduino Library](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)
25+
26+
## :pushpin:Deneyap UV Light Sensor LTR390
27+
This Arduino library allows you to use Deneyap UV Light Sensor LTR390 with I2C peripheral. You can use this library in your projects with any Arduino compatible board with I2C peripheral.
28+
29+
## :globe_with_meridians:Repository Contents
30+
- `/docs ` README_tr.md and product photos
31+
- `/examples ` Examples with .ino extension sketches
32+
- `/src ` Source files (.cpp .h)
33+
- `keywords.txt ` Keywords from this library that will be highlighted in the Arduino IDE
34+
- `library.properties ` General library properties for the Arduino package manager
35+
36+
## Version History
37+
1.0.0 - initial release
38+
39+
## :rocket:Hardware Connections
40+
- Deneyap UV Light Sensor and Board can be connected with I2C cable
41+
- or 3V3, GND, SDA and SCL pins can be connected with jumper cables
42+
43+
|UV Light Sensor| Function | Board pins |
44+
|:--- | :--- | :---|
45+
|3.3V | Power |3.3V |
46+
|GND | Ground | GND |
47+
|SDA | I2C Data | SDA pin |
48+
|SCL | I2C Clock | SCL pin |
49+
|INT | Interrupt| |
50+
51+
## License Information
52+
Please review the [LICENSE](https://github.com/deneyapkart/deneyap-ultraviyole-isik-algilayici-arduino-library/blob/master/LICENSE) file for license information.
53+
54+
This code is partly based on the Adafruit LTR390 Arduino Library. Changed to work with Deneyap UV Light Sensor LTR390 library.
55+
Following their requirements, here is the Adafruit README file:
56+
57+
Adafruit_LTR390 Build Status/Documentation
58+
This is the Adafruit LTR390 UV sensor library
59+
60+
Tested and works great with the Adafruit LTR390 Breakout Board
61+
62+
63+
64+
This chip uses I2C to communicate, 2 pins are required to interface
65+
66+
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
67+
68+
Installation
69+
To install, use the Arduino Library Manager and search for "Adafruit LTR390" and install the library.
70+
71+
Dependencies
72+
Adafruit_BusIO
73+
Contributing
74+
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
75+
76+
Documentation and doxygen
77+
Documentation is produced by doxygen. Contributions should include documentation for any new code added.
78+
79+
Some examples of how to use doxygen can be found in these guide pages:
80+
81+
https://learn.adafruit.com/the-well-automated-arduino-library/doxygen
82+
83+
https://learn.adafruit.com/the-well-automated-arduino-library/doxygen-tips
84+
85+
Formatting and clang-format
86+
This library uses clang-format to standardize the formatting of .cpp and .h files. Contributions should be formatted using clang-format:
87+
88+
The -i flag will make the changes to the file.
89+
90+
clang-format -i *.cpp *.h
91+
If you prefer to make the changes yourself, running clang-format without the -i flag will print out a formatted version of the file. You can save this to a file and diff it against the original to see the changes.
92+
93+
Note that the formatting output by clang-format is what the automated formatting checker will expect. Any diffs from this formatting will result in a failed build until they are addressed. Using the -i flag is highly recommended.
94+
95+
clang-format resources
96+
Binary builds and source available on the LLVM downloads page
97+
Documentation and IDE integration
98+
About this Driver
99+
Written by Limor Fried for Adafruit Industries.
100+
BSD license, check license.txt for more information All text above must be included in any redistribution

docs/README_tr.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Deneyap Ultraviyole Işık Algılayıcı LTR390 Arduino Kütüphanesi
2+
3+
***** Fotoğraf eklenecek ****
4+
5+
Deneyap Ultraviyole Işık Algılayıcı LTR390 için Arduino kütüphanesidir.
6+
7+
## :mag_right:Özellikler
8+
- `Ürün ID` **M41** ,**mpv1.0**
9+
- `MCU` LTR390
10+
- `Ağırlık`
11+
- `Modul Boyutları`
12+
- `I2C Adres` 0x53
13+
14+
| Adres | |
15+
| :--- | :--- |
16+
| 0x53 | varsayılan adres |
17+
18+
## :closed_book:Dokümanlar
19+
Deneyap Ultraviyole Işık Algılayıcı
20+
21+
[LTR390 datasheet](https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf)
22+
23+
[Arduino Kütüphanesi Nasıl İndirilir](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)
24+
25+
## :pushpin:Deneyap Ultraviyole Işık Algılayıcı LTR390
26+
Bu Arduino kütüphanesi Deneyap Ultraviyole Işık Algılayıcı LTR390 I2C çevre birimi ile kullanılmasını sağlar. Arduino ile uyumlu, I2C çevre birimine sahip herhangi bir geliştirme kartı ile bu kütüphaneyi projelerinizde kullanabilirsiniz.
27+
28+
## :globe_with_meridians:Repo İçeriği
29+
- `/docs` README_tr.md ve ürün fotoğrafları
30+
- `/examples` .ino uzantılı örnek uygulamalar
31+
- `/src` kütüphane için .cpp ve .h uzantılı dosyalar
32+
- `keywords.txt` Arduino IDE'de vurgulanacak anahtar kelimeler
33+
- `library.properties` Arduino yöneticisi için genel kütüphane özellikleri
34+
35+
## Sürüm Geçmişi
36+
1.0.0 - ilk sürüm
37+
38+
## :rocket:Donanım Bağlantıları
39+
- Deneyap Ultraviyole Işık Algılayıcı ile kullanılan geliştirme kartı I2C kablosu ile bağlanabilir
40+
- veya jumper kablolar ile 3V3, GND, SDA ve SCL bağlantıları yapılabilir.
41+
42+
|Ultraviyole Işık Algılayıcı| Fonksiyon| Kart pinleri |
43+
| :--- | :--- | :--- |
44+
| 3.3V | Güç | 3.3V |
45+
| GND | Toprak |GND |
46+
| SDA | I2C Data | SDA pini |
47+
| SCL | I2C Clock | SCL pini|
48+
| INT | Interrupt | |
49+
50+
## :bookmark_tabs:Lisans Bilgisi
51+
Lisans bilgileri için [LICENSE](https://github.com/deneyapkart/deneyap-ultraviyole-isik-algilayici-arduino-library/blob/master/LICENSE) dosyasını inceleyin.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Işık Algılama örneği,
3+
*
4+
* Bu örnekte temel konfigürasyon ayarları yapılmaktadır.
5+
* Sensörden gelen Işık Yoğunluğu okumaktadır. Işık Yoğunluğunu seri terminale yazdırmaktadır.
6+
*
7+
* Bu algılayıcı I2C haberleşme protokolü ile çalışmaktadır.
8+
*
9+
* Bu örnek Deneyap Ultraviyole Işık Algılayıcı için oluşturulmuştur
10+
* ------> www.....com <------ //docs
11+
* ------> https://github.com/deneyapkart/deneyap-ultraviyole-isik-algilayici-arduino-library <------
12+
*
13+
*/
14+
#include <Deneyap_UltraviyoleIsikAlgilici.h>
15+
16+
UVlight LTR;
17+
18+
float UltraviyoleIsikYogunlugu;
19+
float OrtamIsikYogunlugu;
20+
21+
void setup() {
22+
Serial.begin(115200);
23+
LTR.begin(0x53);
24+
}
25+
26+
void loop() {
27+
UltraviyoleIsikYogunlugu = LTR.getLUX();
28+
Serial.print("ULTRaviyole Işık Yoğunluğu: ");
29+
Serial.print(UltraviyoleIsikYogunlugu);
30+
31+
OrtamIsikYogunlugu = LTR.readALS();
32+
Serial.print("\tOrtam Işık Yuğunluğu: ");
33+
Serial.println(OrtamIsikYogunlugu);
34+
35+
delay(50);
36+
}

keywords.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#######################################
2+
# Syntax Coloring Map For Deneyap_UltraviyoleIsikAlgilici
3+
#######################################
4+
5+
#######################################
6+
# Library (KEYWORD1)
7+
#######################################
8+
Deneyap_UltraviyoleIsikAlgilici KEYWORD1
9+
10+
####################################
11+
# Class (KEYWORD1)
12+
####################################
13+
UVlight KEYWORD1
14+
15+
#######################################
16+
# Methods and Functions (KEYWORD2)
17+
#######################################
18+
begin KEYWORD2
19+
init KEYWORD2
20+
reset KEYWORD2
21+
enable KEYWORD2
22+
enabled KEYWORD2
23+
setMode KEYWORD2
24+
getMode KEYWORD2
25+
setGain KEYWORD2
26+
getGain KEYWORD2
27+
setResolution KEYWORD2
28+
getResolution KEYWORD2
29+
setThresholds KEYWORD2
30+
configInterrupt KEYWORD2
31+
newDataAvailable KEYWORD2
32+
readUVS KEYWORD2
33+
readALS KEYWORD2
34+
getLUX KEYWORD2
35+
getUVI KEYWORD2
36+
writeRegister KEYWORD2
37+
readRegister KEYWORD2
38+
39+
#######################################
40+
# Constants (LITERAL1)
41+
#######################################
42+
LTR390_MODE_ALS LITERAL1
43+
LTR390_MODE_UVS LITERAL1
44+
LTR390_GAIN_1 LITERAL1
45+
LTR390_GAIN_3 LITERAL1
46+
LTR390_GAIN_6 LITERAL1
47+
LTR390_GAIN_9 LITERAL1
48+
LTR390_GAIN_18 LITERAL1
49+
LTR390_RESOLUTION_20BIT LITERAL1
50+
LTR390_RESOLUTION_19BIT LITERAL1
51+
LTR390_RESOLUTION_18BIT LITERAL1
52+
LTR390_RESOLUTION_17BIT LITERAL1
53+
LTR390_RESOLUTION_16BIT LITERAL1
54+
LTR390_RESOLUTION_13BIT LITERAL1

library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Deneyap Ultraviyole Isik Algilayici
2+
version=1.0.0
3+
author=RFtek Electronics <[email protected]>
4+
maintainer=Turkish Technnology Team Foundation (T3)
5+
sentence=Arduino library for Deneyap UV Light Sensor LTR390
6+
paragraph=A simple and efficient library to use Deneyap UV Light Sensor LTR390 via I2C peripheral.
7+
category=Sensors
8+
url=https://github.com/deneyapkart/deneyap-ultraviyole-isik-algilayici-arduino-library
9+
architectures=*

0 commit comments

Comments
 (0)