Open KamilCaliskan opened 1 year ago
//include the library code:
const int rs=35, en=33, d4=31, d5=29, d6=27, d7=25; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); byte yükari=0, asagi=255; unsigned int sayi1, sayi2;
void setup(){
lcd.begin(16,2);
lcd.print("hello world"); }
void loop(){ lcd.setCursor(0,0); //sütün satir lcd.print(yükari,""); lcd.setCursor(0,0); // 3 bitini bos birak 4 ten basla lcd.setCursor(8,0); // 7bitini bos birak 8 den basla lcd.print(asagi); yükari++; asagi--; lcd.print(millis()/1000); delay(100); lcd.clear(); // ekrni temizle }
//include the library code:
const int rs=35, en=33, d4=31, d5=29, d6=27, d7=25; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); byte yukari=0,asagi=255; unsigned int sayi1, sayi2; // 0 ile 65000000 arasi bütün sayilar // eger 65bin küsürü gececer se unsigned long int
void setup(){ lcd.begin(16,2); Serial.begin(9600); pinMode(A0,INPUT); pinMode(A1,INPUT); lcd.print("hello world"); }
// iki sayinin arpiminide göstersin void loop(){ sayi1=796; //hata oldugu icin sabit sayi girdik sayi2=analogRead(A1); Serial.println(sayi1); lcd.setCursor(0,0); //sütün satir lcd.print(yukari," "); lcd.setCursor(0,0); // 3 bitini bos birak 4 ten basla lcd.setCursor(8,0); // 7bitini bos birak 8 den basla lcd.print(asagi); yukari ++; asagi --; lcd.setCursor(4,0); lcd.print(sayi1); lcd.setCursor(9,0); lcd.print(sayi2); lcd.setCursor(4,1); lcd.print(sayi1*say2); delay(100); lcd.clear(); // ekrani temizle her seferinde }
//include the library code:
const int rs=35, en=33, d4=31, d5=29, d6=27, d7=25; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); byte saniyelcd,dakikalcd=54,saatlcd=9; unsigned long int saniye,saniyeeski; // 0 ile 65000000 arasi bütün sayilar // eger 65bin küsürü gececer se unsigned long int
void setup(){ lcd.begin(16,2);
pinMode(2,INPUT); pinMode(3,INPUT); lcd.print("hello world"); }
void loop(){ saniye=millis()/10; if(saniye>saniyeeski){ saniyeeski=saniye; saniyelcd++; } if(saniyelcd=60){ saniyelcd=0; dakikalcd++; } if(dakikalcd==60){ dakikalcd=0; saatlcd++; } if(saatlcd==24) saatlcd=0;
lcd.clear(); // ekrani temizle her seferinde lcd.setCursor(0,0); lcd.print(saatlcd); lcd.print(":"); lcd.print(dakikalcd); lcd.print(":"); lcd.print(saniyelcd); }
const int rs = 35, en = 33, d4 = 31, d5 = 29, d6 = 27, d7 = 25; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); byte saniyelcd,dakikalcd=59,saatlcd=9,setcounter=0; unsigned int mesafe,hiz; unsigned long int saniye,saniyeeski,beklemesaniyesi,yarimsaniye,pulsaraligi,milliseski; bool beklemebitti=1;
void setup() { lcd.begin(16,2); pinMode(2,INPUT); pinMode(3,INPUT); pinMode(18,INPUT); attachInterrupt(digitalPinToInterrupt(2),set,RISING); attachInterrupt(digitalPinToInterrupt(3),res,RISING); attachInterrupt(digitalPinToInterrupt(18),tekerlek,RISING); } void tekerlek(){ pulsaraligi=millis()-milliseski; milliseski=millis(); hiz=72/pulsaraligi; if (hiz<5) hiz=0; mesafe+=2; } void set(){ if (beklemebitti==1){ beklemebitti=0; beklemesaniyesi=yarimsaniye; setcounter++; if (setcounter==4) setcounter=0;}} void res(){ if (beklemebitti==1){ beklemebitti=0; beklemesaniyesi=yarimsaniye; if (setcounter==1){ saatlcd++; if (saatlcd==24) saatlcd=0;} else if (setcounter==2){ dakikalcd++; if (dakikalcd==60) dakikalcd=0;} else if (setcounter==3) saniyelcd=0;}}
void loop() { yarimsaniye=millis()/500; saniye=millis()/1000; if (saniye>saniyeeski){ saniyeeski=saniye; saniyelcd++; } if (saniyelcd==60){ saniyelcd=0; dakikalcd++; } if (dakikalcd==60){ dakikalcd=0; saatlcd++; } if (saatlcd==24) saatlcd=0; if (yarimsaniye>beklemesaniyesi) beklemebitti=1; lcd.clear(); lcd.setCursor(0,0);//sütun satýr if (setcounter==1){ if (yarimsaniye%2==1) lcd.setCursor(2,0); else{ if (saatlcd<10) lcd.print("0"); lcd.print(saatlcd);} } else{ if (saatlcd<10) lcd.print("0"); lcd.print(saatlcd);} lcd.print(":"); //SAAT VE DAKÝKA ARASINDAKÝ : if (setcounter==2){ if (yarimsaniye%2==1) lcd.setCursor(5,0); else{ if (dakikalcd<10) lcd.print("0"); lcd.print(dakikalcd);} } else{ if (dakikalcd<10) lcd.print("0"); lcd.print(dakikalcd);} lcd.print(":"); //DAKÝKA VE SANÝYE ARASINDAKÝ : if (setcounter==3){ if (yarimsaniye%2==0){ if (saniyelcd<10) lcd.print("0"); lcd.print(saniyelcd);} } else{ if (saniyelcd<10) lcd.print("0"); lcd.print(saniyelcd);}
if (mesafe<100){ if (mesafe<10) lcd.setCursor(2,1); else lcd.setCursor(1,1);} else lcd.setCursor(0,1); lcd.print(mesafe); delay(250); }
//include the library code:
include
const int rs=35, en=33, d4=31, d5=29, d6=27, d7=25; LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup(){ //set up the lcd's number of columns and rows: lcd.begin(16,2);
//print a message to the LCD lcd.print("hello world"); }
void loop(){ // (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0,1);
//print the number of second since reset: lcd.print(millis()/1000); }