From d69dfc4d34937f9f2973911b87f580ff4f30ae27 Mon Sep 17 00:00:00 2001 From: OnurKonuk174 <51912619+OnurKonuk174@users.noreply.github.com> Date: Wed, 28 Sep 2022 14:40:01 +0300 Subject: [PATCH] Update and rename .gitattributes to led.uno --- .gitattributes | 2 -- led.uno | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) delete mode 100644 .gitattributes create mode 100644 led.uno diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/led.uno b/led.uno new file mode 100644 index 0000000..b5b906e --- /dev/null +++ b/led.uno @@ -0,0 +1,26 @@ +void setup() { +for(int i=0;i<9;i++){ + pinMode(i,OUTPUT); + } +} + +int sayac=0; +int yon=1; +void loop() { + for(int i=0;i<9;i++) { + digitalWrite(i,LOW); +} + digitalWrite(sayac,HIGH); + if(yon==1)sayac++; + if(yon==2)sayac--; + + if(sayac>9){ + sayac=9; + yon=2; +} + if(sayac<1){ + sayac=2; + yon=1; + } + delay(60); + }