Skip to content

Instantly share code, notes, and snippets.

@RobolinkAkademi
Last active October 28, 2019 07:19
Show Gist options
  • Save RobolinkAkademi/86b740ece0c05afd32d2ed23b5260105 to your computer and use it in GitHub Desktop.
Save RobolinkAkademi/86b740ece0c05afd32d2ed23b5260105 to your computer and use it in GitHub Desktop.
tum_yil_icin_arduino_mufredati_30
const int A = 0;
const int B = 1;
const int C = 2;
const int D = 3;
const int E = 4;
const int F = 5;
const int G = 6;
const int H = 7;
char sayilar_noktali[10]={0x40, 0x79, 0x24, 0x30, 0x19, 0x12, 0x02, 0x78, 0x00, 0x10};
int sayilar_noktasiz[10]={0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90};
int harfler[]={0b00001000, 0b00000011, 0xC6, 0b10100001, 0b00000110, 0b00001110, 0x10, 0b00001001};
int sayac=0;
void setup() {
pinMode(A, OUTPUT);
pinMode(B, OUTPUT);
pinMode(C, OUTPUT);
pinMode(D, OUTPUT);
pinMode(E, OUTPUT);
pinMode(F, OUTPUT);
pinMode(G, OUTPUT);
pinMode(H, OUTPUT);
}
void loop(){
for(sayac=0;sayac<10;sayac++)
{
PORTD=sayilar_noktali[sayac];
delay(500);
}
for(sayac=9; sayac>=0;sayac--)
{
PORTD=sayilar_noktasiz[sayac];
delay(500);
}
fpr(sayac=0; sayac<8;sayac++)
{
PORTD=harfler[sayac];
delay(1000);
}
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment