Skip to content

Instantly share code, notes, and snippets.

@yemreeke
Created December 23, 2020 19:23
Show Gist options
  • Save yemreeke/dc4578f3f02b8ef834ab5bbe419cce96 to your computer and use it in GitHub Desktop.
Save yemreeke/dc4578f3f02b8ef834ab5bbe419cce96 to your computer and use it in GitHub Desktop.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
}
void loop() {
Yazdir("BLUEGRAYS",800);//Metin ve süre
}
void Yazdir(String msg,int sure){
int size = msg.length();
for(int i=0;i<=16-size;i++){
lcd.clear();
lcd.setCursor(i,0);
lcd.print(msg);
delay(sure);
}
for(int i=16-size;i>0;i--){
lcd.clear();
lcd.setCursor(i,0);
lcd.print(msg);
delay(sure);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment