c ile çok benzermiş bunun kod yapısı. o yüzden siz de baksanız iyi olur dedim. internette şöyle bir kod buldum,
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() { // set pim 13 as LED background pinMode(13, OUTPUT); // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD.
}
void loop() { for (int i=0; i <= 10; i++){ // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0):
lcd.print("www.tehnic.go.ro"); lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(" by niq_ro"); // background LED is ON digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear(); delay(1000);
//text is changed lcd.print(" niq_ro made"); lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print("www.tehnic.go.ro"); // background LED is ON digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear(); delay(1000);
lcd.print("www.tehnic.go.ro"); lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(" by niq_ro"); // background LED is ON digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear(); delay(1000);
//text is changed lcd.print(" niq_ro made"); lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print("www.niqro.3x.ro"); // background LED is ON digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear(); delay(1000);
lcd.print("www.niqro.3x.ro"); lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(" by niq_ro"); // background LED is ON digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear(); delay(1000);
} }
normalde arkaplan aydınlatması hep açık olur, o sırada bir şeyler yazıp sileriz ya biz; adam 13 nolu pine takmış arka aydınlatmayı, o pini de yöneterek şunu yapmış: "bir şey yaz, arka aydınlatmayı kapat. açtığında başka bir şey yansın. kapat, ilki yansın" mantık bu.
benim isteğim şu, arka aydınlatma kapalıyken de farklı bir şey yazmak istiyorum. seyrek de olsa okunuyor aydınlatma kapalıyken. arka plan 3 saniye yanıyor ana yazımızı koyuyoruz, 1 saniye sönüyor sönükken de başka bir şey yazıyoruz.
kodu nereye yerleştireceğimi bulamadım. yardım ederseniz sevinirim.
Şimdi arduino kullandım ama hep hazır kod felan denemesi yaptım.Genede program mantığına bakacak olursak sizin istediğiniz lcd sönükken bir şey yazmak. Burada LCD nin söndüğü adım şu digitalWrite(13, LOW); sonra ekran temizleniyor lcd.clear(); Buradan sonra 1 saniye bekleme var siz bekleme adımından önce lcdye bir şey gönderirseniz yanmadan önce 1 sn.süre ile gönderileni Lcd gösterir.Öyleyse hazır kodun arasına aşağıdaki gibi yazılmalı.
digitalWrite(13, LOW); // turn the LED off (LOW is the voltage level) // clear screen for the next loop: lcd.clear();
normalde arkaplan aydınlatması hep açık olur, o sırada bir şeyler yazıp sileriz ya biz; adam 13 nolu pine takmış arka aydınlatmayı, o pini de yöneterek şunu yapmış: "bir şey yaz, arka aydınlatmayı kapat. açtığında başka bir şey yansın. kapat, ilki yansın" mantık bu.
benim isteğim şu, arka aydınlatma kapalıyken de farklı bir şey yazmak istiyorum. seyrek de olsa okunuyor aydınlatma kapalıyken. arka plan 3 saniye yanıyor ana yazımızı koyuyoruz, 1 saniye sönüyor sönükken de başka bir şey yazıyoruz.
kodu nereye yerleştireceğimi bulamadım. yardım ederseniz sevinirim.