Skip to content

Commit 34ba9e7

Browse files
committed
Initial upload
1 parent 7ed8bcb commit 34ba9e7

File tree

8 files changed

+472
-0
lines changed

8 files changed

+472
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Deneyap Gas Sensor Arduino 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 Gas Sensor
7+
8+
## :mag_right:Specifications
9+
- `Product ID` **M39**, **mpv1.0**
10+
- `MCU` STM8S003F3
11+
- `Weight`
12+
- `Module Dimension`
13+
- `I2C address` 0x20, 0x4E, 0x57, 0x58
14+
15+
| Address | |
16+
| :--- | :--- |
17+
| 0x20 | default address |
18+
| 0x4E | address when ADR1 pad is shorted |
19+
| 0x57 | address when ADR2 pad is shorted |
20+
| 0x58 | address when ADR1 and ADR2 pads are shorted |
21+
22+
## :closed_book:Documentation
23+
Deneyap Gas Sensor
24+
25+
[How to install a Arduino Library](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)
26+
27+
## :pushpin:Deneyap Gas Sensor
28+
This Arduino library allows you to use Deneyap Gas Sensor with I2C peripheral. You can use this library in your projects with any Arduino compatible board with I2C peripheral.
29+
30+
## :globe_with_meridians:Repository Contents
31+
- `/docs ` README_tr.md and product photos
32+
- `/examples ` Examples with .ino extension sketches
33+
- `/src ` Source files (.cpp .h)
34+
- `keywords.txt ` Keywords from this library that will be highlighted in the Arduino IDE
35+
- `library.properties ` General library properties for the Arduino package manager
36+
37+
## Version History
38+
1.0.0 - initial release
39+
40+
## :rocket:Hardware Connections
41+
- Deneyap Gas Sensor and Board can be connected with I2C cable
42+
- or 3V3, GND, SDA and SCL pins can be connected with jumper cables
43+
44+
|Gas Sensor| Function | Board pins |
45+
|:--- | :--- | :---|
46+
|3.3V | Power |3.3V |
47+
|GND | Ground | GND |
48+
|SDA | I2C Data | SDA pin |
49+
|SCL | I2C Clock | SCL pin |
50+
|SWIM | Debug | no connection |
51+
|RES | Debug | no connection |
52+
| AO |Analog Output|any Analog pin|
53+
| DO |Dijital Output|any GPIO pin|
54+
| H |||
55+
56+
## :bookmark_tabs:License Information
57+
Please review the [LICENSE](https://github.com/deneyapkart/deneyap-duman-dedektoru-arduino-library/blob/master/LICENSE) file for license information.

docs/README_tr.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Deneyap Duman Dedektörü Arduino Kütüphanesi
2+
3+
***** Fotoğraf eklenecek ****
4+
5+
Deneyap Duman Dedektörü için Arduino kütüphanesidir.
6+
7+
## :mag_right:Özellikler
8+
- `Ürün ID` **M39**, **mpv1.0**
9+
- `MCU` STM8S003F3
10+
- `Ağırlık`
11+
- `Modul Boyutları`
12+
- `I2C Adres` 0x20, 0x4E, 0x57, 0x58
13+
14+
| Adres | |
15+
| :--- | :--- |
16+
| 0x20 | varsayılan adres |
17+
| 0x4E | ADR1 kısa devre yapıldığındaki adres |
18+
| 0x57 | ADR2 kısa devre yapıldığındaki adres |
19+
| 0x58 | ADR1 ve ADR2 kısa devre yapıldığındaki adres |
20+
21+
## :closed_book:Dokümanlar
22+
Deneyap Duman Dedektörü
23+
24+
[Arduino Kütüphanesi Nasıl İndirilir](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)
25+
26+
## :pushpin:Deneyap Duman Dedektörü
27+
Bu Arduino kütüphanesi Deneyap Duman Dedektörü 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.
28+
29+
## :globe_with_meridians:Repo İçeriği
30+
- `/docs` README_tr.md ve ürün fotoğrafları
31+
- `/examples` .ino uzantılı örnek uygulamalar
32+
- `/src` kütüphane için .cpp ve .h uzantılı dosyalar
33+
- `keywords.txt` Arduino IDE'de vurgulanacak anahtar kelimeler
34+
- `library.properties` Arduino yöneticisi için genel kütüphane özellikleri
35+
36+
## Sürüm Geçmişi
37+
1.0.0 - ilk sürüm
38+
39+
## :rocket:Donanım Bağlantıları
40+
- Deneyap Duman Dedektörü ile kullanılan geliştirme kartı I2C kablosu ile bağlanabilir
41+
- veya jumper kablolar ile ile 3V3, GND, SDA ve SCL bağlantıları yapılabilir.
42+
43+
| Duman Dedektörü | Fonksiyon| Kart pinleri |
44+
| :--- | :--- | :--- |
45+
| 3.3V | Güç | 3.3V |
46+
| GND | Toprak |GND |
47+
| SDA | I2C Data | SDA pini |
48+
| SCL | I2C Clock | SCL pini|
49+
| SWIM | Debug | bağlantı yok |
50+
| RES | Debug | bağlantı yok |
51+
| AO |Analog Output|herhangi Analog pini|
52+
| DO |Dijital Output|herhangi GPIO pini|
53+
| H |||
54+
55+
## :bookmark_tabs:Lisans Bilgisi
56+
Lisans bilgileri için [LICENSE](https://github.com/deneyapkart/deneyap-duman-dedektoru-arduino-library/blob/master/LICENSE) dosyasını inceleyin.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Duman Algılama örneği,
3+
*
4+
* Bu örnekte temel konfigürasyon ayarları yapılmaktadır.
5+
* Sensörden gelen duman değerleri okumaktadır. Bu değerleri seri monitöre yazdırmaktadır.
6+
* Duman algılayınca Duman Dedektörü kartındaki yeşil çıkış ledi yanmaktadır.
7+
* Not: Karta ilk güç verildiketn sonra yeşil çıkış led sönene kadar beklenilmeli. Led sönme süresi uzadığı takdirde üzerindeki pot değeri değiştirilmelidir.
8+
*
9+
* Bu algılayıcı I2C haberleşme protokolü ile çalışmaktadır.
10+
*
11+
* Bu örnek Deneyap Duman Dedektörü için oluşturulmuştur
12+
* ------> www.....com <------ //docs
13+
* ------> https://github.com/deneyapkart/deneyap-duman-dedektoru-arduino-library <------
14+
*
15+
*/
16+
17+
#include <Deneyap_DumanDedektoru.h> // Deneyap_DumanDedektoru kutuphanesi eklenmesi
18+
19+
SmokeDetector DumanSensor; // SmokeDetector için class tanımlaması
20+
21+
void setup() {
22+
Serial.begin(115200); // Seri haberlesme baslatılması
23+
if (!DumanSensor.begin(0x20)) { // begin(slaveAdress) fonksiyonu ile cihazların haberleşmesi başlatılması
24+
delay(3000);
25+
Serial.println("I2C bağlantısı başarısız "); // I2C bağlantısı başarısız olursa seri monitore yazdırılması
26+
while (1);
27+
}
28+
}
29+
30+
void loop() {
31+
/* ReadSmokeDetectorDigital() = 0 ise "duman ALGILANDI"
32+
1 ise "duman ALGILANMADI" */
33+
bool dumanDurum = DumanSensor.ReadSmokeDigital(); // Duman durumu okunması
34+
Serial.print("Duman Durumu:");
35+
Serial.print(dumanDurum); // Duman durumu seri monitore yazdırılması
36+
37+
uint16_t dumanDeger = DumanSensor.ReadSmokeAnalog(); // Duman degeri okunması
38+
Serial.print("\t Duman Degeri:");
39+
Serial.println(dumanDeger); // Duman verisi seri monitore yazdırılması
40+
41+
delay(10);
42+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* I2C haberleşme protokolü kullanılmadan Duman Algılama örneği,
3+
*
4+
* Sensörden gelen duman değerleri okumaktadır. Bu değerleri seri monitöre yazdırmaktadır.
5+
* Duman algılayınca Duman Dedektörü kartındaki yeşil çıkış ledi yanmaktadır.
6+
* Not: Karta ilk güç verildiketn sonra yeşil çıkış led sönene kadar beklenilmeli. Led sönme süresi uzadığı takdirde üzerindeki pot değeri değiştirilmelidir.
7+
*
8+
* Bu algılayıcı I2C haberleşme protokolü ile çalışmaktadır.
9+
* Bu örnek I2C haberleşme protokolü kullanılmadan yazılmıştır.
10+
*
11+
* Bu örnek Deneyap Duman Dedektörü için oluşturulmuştur
12+
* ------> www.....com <------ //docs
13+
* ------> https://github.com/deneyapkart/deneyap-duman-dedektoru-arduino-library <------
14+
*
15+
*/
16+
17+
#define DOUTPIN D0 // Duman Dedektörü kartındaki DO pininin D0 pinine baglanmalıdır
18+
#define AOUTPIN A0 // Duman Dedektörü kartındaki AO pininin A0 pinine baglanmalıdır
19+
20+
void setup() {
21+
Serial.begin(115200); // Seri haberleşme başlatılması
22+
}
23+
24+
void loop() {
25+
bool DumanDurum = digitalRead(DOUTPIN); // Duman durumu okunması
26+
Serial.print("Duman Durumu: ");
27+
Serial.print(DumanDurum); // Duman durumu seri monitore yazdırılması
28+
29+
uint16_t DumanDeger = analogRead(AOUTPIN); // Duman degerinin okunması
30+
Serial.print("\tDuman Degeri: ");
31+
Serial.println(DumanDeger); // Duman verisi seri monitore yazdırılması
32+
}

keywords.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#######################################
2+
# Syntax Coloring Map For Deneyap_DumanDedektoru
3+
#######################################
4+
5+
#######################################
6+
# Library (KEYWORD1)
7+
#######################################
8+
9+
Deneyap_DumanDedektoru KEYWORD1
10+
11+
#######################################
12+
# Class (KEYWORD1)
13+
#######################################
14+
15+
SmokeDetector KEYWORD1
16+
17+
#######################################
18+
# Methods and Functions (KEYWORD2)
19+
#######################################
20+
begin KEYWORD2
21+
isConnected KEYWORD2
22+
getFwVersion KEYWORD2
23+
setI2Caddress KEYWORD2
24+
ReadSmokeDigital KEYWORD2
25+
ReadSmokeAnalog KEYWORD2
26+
27+
#######################################
28+
# Constants (LITERAL1)
29+
#######################################

library.properties

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

0 commit comments

Comments
 (0)