Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
#include <LCD5110_Basic.h>
#define DHT11PIN 2
LCD5110 myGLCD(8,9,10,11,12);
extern uint8_t SmallFont[];
extern uint8_t MediumNumbers[];
extern uint8_t BigNumbers[];
int echopin=5;
int ledpin2=4;
int analogdeger;
int analogpin=A0;
int trigpin=3;
int buzzerpin=7;
int sure;
int mesafe;
int chk;
float deger;
dht11 DHT11;
int pirPin = 6;
boolean state=0;
int ledpin =13;
void setup() {
pinMode(pirPin, INPUT); // PIR Pin'i giriş yapılıyor
Serial.begin(9600); //Serial Porttan veri göndermek için baundrate ayarlanıyor.
myGLCD.InitLCD();
pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);
pinMode(buzzerpin, OUTPUT);
pinMode(ledpin,OUTPUT);
pinMode(ledpin2,OUTPUT);
pinMode(pirPin,INPUT);
}
void loop(){
analogdeger=analogRead(analogpin);
Serial.println(analogdeger);
if(analogdeger<300){
digitalWrite(ledpin2,LOW);
delay(1000);
}
else{
digitalWrite(ledpin2,HIGH);
}
Serial.println();
chk = DHT11.read(DHT11PIN);
deger=DHT11.temperature;
Serial.println((float)DHT11.humidity, 2);
Serial.print("Sicaklik (Celcius): ");
Serial.println((float)DHT11.temperature, 2);
myGLCD.setFont(MediumNumbers);
myGLCD.setFont(SmallFont);
myGLCD.clrScr();
myGLCD.print("MERHABALAR",CENTER,9);
myGLCD.print("Sicaklik:",CENTER,23);
myGLCD.printNumI(deger,CENTER,30);
myGLCD.print("Derece",CENTER,35);
digitalWrite(trigpin,HIGH);
delayMicroseconds(1000);
digitalWrite(trigpin,LOW);
sure=pulseIn(echopin,HIGH);
mesafe=(sure/2)/29.1;
if(mesafe<=6){
digitalWrite(buzzerpin,HIGH);
delay(50);
digitalWrite(buzzerpin,LOW);
delay(50);
}
else{
digitalWrite(buzzerpin,HIGH);
delay(200);
digitalWrite(buzzerpin,LOW);
delay(200);
}
deger = digitalRead(pirPin); // sensörü oku value değerine at
if (deger == HIGH) { // eğer value değeri ="1" ise
digitalWrite(ledpin, HIGH); //LED i yak
delay(100);
if (state == LOW) {
state = HIGH;
}
}
else {
digitalWrite(ledpin, LOW);
delay(100);
if (state == HIGH){
state = LOW;
}
}
digitalWrite(trigpin,LOW);
delayMicroseconds(1000);
digitalWrite(trigpin,HIGH);
delayMicroseconds(10);
digitalWrite(trigpin,LOW);
sure = pulseIn(echopin,HIGH);
mesafe=(sure/2)/29.1;
if(mesafe<4){
digitalWrite(buzzerpin,HIGH);
}
else if(mesafe>4 && mesafe<8){
digitalWrite(buzzerpin,HIGH);
delay(150);
digitalWrite(buzzerpin,LOW);
delay(150);
}
else{
digitalWrite(buzzerpin,LOW);
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team