NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <virtuabotixRTC.h>
#include <dht11.h>
#include <Keypad.h>

int DHT11_pin=2;
dht11 dhtsensor;

///////////////////////////////////////////////////////
const byte Satir= 4; // keypad satır sayısı
const byte Sutun= 4; // keypad sütün sayısı

// Keypad tuş yapısı
char key[Satir][Sutun]=
{
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};

// Arduino bağlantı bacakları (Keypad İçin)
byte SatirPinleri[Satir] = {6,7,8,9};
byte SutunPinleri[Sutun]= {10,11,12,13};

//Keypad için değişken belirliyoruz
Keypad tustakimi= Keypad(makeKeymap(key), SatirPinleri, SutunPinleri, Satir, Sutun);
//////////////////////////////////////////////////////////////////////////////////////////////////7
virtuabotixRTC myRTC(5, 4, 3);

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32


#define OLED_RESET 4
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

int saat,dakika;
long saniye,eskisaniye,yenisaniye;
int gun,ay,yil,haftagunu;


void setup() {
Serial.begin(9600);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}


display.display();
delay(2000);
display.clearDisplay();

for(int i=0;i<=126;i++){
display.drawPixel(i, 15, WHITE);
}
display.display();
//saat=16; dakika=59; saniye=0;
//eskisaniye=millis();



}

int sayfasayisi=0;

void loop() {
char basilanTus = tustakimi.getKey(); // Keyped basılan tuş değerini alıyoruz.
if (basilanTus != NO_KEY) {
switch(basilanTus){
case '1':
sayfasayisi=1;
break;
case '2':
sayfasayisi=2;
break;
}
}

switch(sayfasayisi){
case 1:
sayfa_1();
break;
case 2:
sayfa_2();
break;
}
}


//Saat Ve Tarih (Ana) Sayfa
void sayfa_1(){
myRTC.updateTime();
saniye=myRTC.seconds;
dakika=myRTC.minutes;
saat=myRTC.hours;
gun=myRTC.dayofmonth;
ay=myRTC.month;
yil=myRTC.year;
haftagunu=myRTC.dayofweek;


display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 16);
display.print(saat);
display.print(F(":"));
if(dakika<10) display.print(F("0"));
display.print(dakika);
display.print(F(":"));
display.setTextSize(1);
display.setCursor(70,24);
display.print(saniye);
display.setCursor(0,0);
display.setTextSize(1);
display.print(gun);
display.print(F("."));
display.print(ay);
display.print(F("."));
display.print(yil);
display.print(F(" "));
//haftagunu=6;
switch(haftagunu){
case 1:
display.print(F("Pazartesi"));
break;
case 2:
display.print(F("Sali"));
break;
case 3:
display.print(F("Carsamba"));
break;
case 4:
display.print(F("Persembe"));
break;
case 5:
display.print(F("Cuma"));
break;
case 6:
display.print(F("Cumartesi"));
break;
case 7:
display.print(F("Pazar"));
break;
}
display.display();
}

///Isı Nem Sayfası
void sayfa_2(){
int check=dhtsensor.read(DHT11_pin);

display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 16);
display.print(F("Sicaklik -> "));
display.print((float)dhtsensor.temperature,2);

myRTC.updateTime();
saniye=myRTC.seconds;
dakika=myRTC.minutes;
saat=myRTC.hours;
gun=myRTC.dayofmonth;
ay=myRTC.month;
yil=myRTC.year;
haftagunu=myRTC.dayofweek;

display.setTextSize(1);
display.setCursor(0, 0);
display.print(saat);
display.print(F(":"));
if(dakika<10) display.print(F("0"));
display.print(dakika);
display.print(F(":"));
display.print(saniye);

display.display();
}
     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.