Skip to content

Instantly share code, notes, and snippets.

@RobolinkAkademi
Last active October 28, 2019 07:14
Show Gist options
  • Save RobolinkAkademi/0715993661e7a5c36aff93164f9c7923 to your computer and use it in GitHub Desktop.
Save RobolinkAkademi/0715993661e7a5c36aff93164f9c7923 to your computer and use it in GitHub Desktop.
tum_yil_icin_arduino_mufredati_20
#include <LedControl.h> //LedControl.h kütüphanesinin tanımlanması
int DIN=12; //dotmatric pinlerinin tanımlanmaı
int CS=11;
int CLK=10;
LedControl lc=LedControl(DIN,CLK,CS,0); //lc değişkenini tanımlanması
void setup() {
lc.shutdown(0,false);
lc.setIntensity(0,15); //dot matrix parlaklığı
lc.clearDisplay(0); //dotmatrixin temizlenmesi
}
void loop() {
byte R[8]={0x00,0x38,0x24,0x24,0x38,0x24,0x24,0x00}; //R harfi hexadecimal
printByte(R); //R harfinin dotmatrixde gösterilmesi
delay(1000); //1000 milisaniye beklenmesi
}
void printByte(byte character[]) //printbyte adında fonksiyon oluşturulması
{ int i=0; //i değişkenine 0 atanması
for(i=0;i<8;i++) //8 adımlı bir fonksiyon tanımlanması
{lc.setRow(0,i,character[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment