Ko bisa gitu ya.. Ini dulu punya siapa?.. Aku bikin…

Ko bisa gitu ya..
Ini dulu punya siapa?..
Aku bikin dr yg prnah di post sama kang adam mashuri ko bisa pada digit jam ada display '' ( '' dan pada digit tanggal ada display '' : ''
Padahal di displayCharNya ga ada gitunya,,
Coding di komentar.
eyang master mohon petunjuknya..

Ko bisa gitu ya..
Ini dulu punya siapa?..
Aku bikin dr yg prnah di post sama kang adam mashuri ko bisa pada digit jam ada display '' ( '' dan pada digit tanggal ada display '' : ''
Padahal di displayCharNya ga ada gitunya,,
Coding di komentar.
eyang master mohon petunjuknya..


22 thoughts on “Ko bisa gitu ya.. Ini dulu punya siapa?.. Aku bikin…

  1. Zevince Wahidz

    # include
    #include
    RTC_DS1307 RTC;
    int delayTime = 400; //lebar huruf 1.5
    int charBreak = 1; //spasi antar huruf 2.5
    int LED8 = 0;
    int LED1 = 1;
    int LED2 = 2;
    int LED3 = 3;
    int LED4 = 4;
    int LED5 = 5;
    int LED6 = 6;
    int LED7 = 7;
    const int sensor=10;
    int iR=0;
    void setup(){
    Wire.begin();
    RTC.begin(); // utk set jam hilangkan double shlash (//)
    //RTC.adjust(DateTime(__DATE__, __TIME__)); // utk set jam hilangkan double shlash (//)
    pinMode(LED1, OUTPUT);
    pinMode(LED2, OUTPUT);
    pinMode(LED3, OUTPUT);
    pinMode(LED4, OUTPUT);
    pinMode(LED5, OUTPUT);
    pinMode(LED6, OUTPUT);
    pinMode(LED7, OUTPUT);
    pinMode(LED8, OUTPUT);
    pinMode(sensor,INPUT);
    }
    int angka1[] = {0,66,127,64,0};
    int angka2[] = {66,97,81,73,70};
    int angka3[] = {34,65,73,73,54};
    int angka4[] = {24,20,18,127,16};
    int angka5[] = {39,69,69,69,57};
    int angka6[] = {62,73,73,73,50};
    int angka7[] = {1,1,113,9,7};
    int angka8[] = {54,73,73,73,54};
    int angka9[] = {38,73,73,73,62};
    int angka0[] = {62,65,65,65,62};
    int titikdua[] = {0,54,0};
    int spasi[] = {0,0,0,0,0};
    int kurang[] = {16,16,16};
    int a[] = {0,18,31,16,0};//1
    int b[] = {25,21,21,21,18}; //2
    int c2[] = {17,21,21,21,10}; //3
    int d[] = {12,10,9,31,8};//4
    int e[] = {23,21,21,21,9}; //5
    int f[] = {14,21,21,21,9}; //6
    int g[] = {1,1,25,5,3}; //7
    int h[] = {10,21,21,21,10}; //8
    int i[] = {18,21,21,21,14}; //9
    int j[] = {14,17,17,17,14}; //0
    void displayLine(intline){
    int myline;
    myline = line;
    if (myline>=64) {digitalWrite(LED7, HIGH); myline-=64;} else {digitalWrite(LED7, LOW);}
    if (myline>=32) {digitalWrite(LED6, HIGH); myline-=32;} else {digitalWrite(LED6, LOW);}
    if (myline>=16) {digitalWrite(LED5, HIGH); myline-=16;} else {digitalWrite(LED5, LOW);}
    if (myline>=8) {digitalWrite(LED4, HIGH); myline-=8;} else {digitalWrite(LED4, LOW);}
    if (myline>=4) {digitalWrite(LED3, HIGH); myline-=4;} else {digitalWrite(LED3, LOW);}
    if (myline>=2) {digitalWrite(LED2, HIGH); myline-=2;} else {digitalWrite(LED2, LOW);}
    if (myline>=1) {digitalWrite(LED1, HIGH); myline-=1;} else {digitalWrite(LED1, LOW);}
    }
    void displayBaris(int baris){
    int barisku;
    barisku = baris;
    if (barisku>=64) {digitalWrite(LED1, HIGH); barisku-=64;} else {digitalWrite(LED1, LOW);}
    if (barisku>=32) {digitalWrite(LED2, HIGH); barisku-=32;} else {digitalWrite(LED2, LOW);}
    if (barisku>=16) {digitalWrite(LED3, HIGH); barisku-=16;} else {digitalWrite(LED3, LOW);}
    if (barisku>=8) {digitalWrite(LED4, HIGH); barisku-=8;} else {digitalWrite(LED4, LOW);}
    if (barisku>=4) {digitalWrite(LED5, HIGH); barisku-=4;} else {digitalWrite(LED5, LOW);}
    if (barisku>=2) {digitalWrite(LED6, HIGH); barisku-=2;} else {digitalWrite(LED6, LOW);}
    if (barisku>=1) {digitalWrite(LED7, HIGH); barisku-=1;} else {digitalWrite(LED7, LOW);}
    }
    void displayChar(char c){
    if (c == ' '){for (int i = 0; i <5; i++){displayLine(spasi[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '-'){for (int i = 0; i ♥; i++){displayLine(kurang[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == ':'){for (int i = 0; i ♥; i++){displayLine(titikdua[i]);delayMicroseconds(delayTime);}displayLine(0);}
    // Angka
    if (c == '1'){for (int i = 0; i <5; i++){displayLine(angka1[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '2'){for (int i = 0; i <5; i++){displayLine(angka2[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '3'){for (int i = 0; i <5; i++){displayLine(angka3[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '4'){for (int i = 0; i <5; i++){displayLine(angka4[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '5'){for (int i = 0; i <5; i++){displayLine(angka5[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '6'){for (int i = 0; i <5; i++){displayLine(angka6[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '7'){for (int i = 0; i <5; i++){displayLine(angka7[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '8'){for (int i = 0; i <5; i++){displayLine(angka8[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '9'){for (int i = 0; i <5; i++){displayLine(angka9[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == '0'){for (int i = 0; i <5; i++){displayLine(angka0[i]);delayMicroseconds(delayTime);}displayLine(0);}
    if (c == 'a'){for (int i = 4; i >= 0; i--){displayBaris(a[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'b'){for (int i = 4; i >= 0; i--){displayBaris(b[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'c'){for (int i = 4; i >= 0; i--){displayBaris(c2[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'd'){for (int i = 4; i >= 0; i--){displayBaris(d[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'e'){for (int i = 4; i >= 0; i--){displayBaris(e[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'f'){for (int i = 4; i >= 0; i--){displayBaris(f[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'g'){for (int i = 4; i >= 0; i--){displayBaris(g[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'h'){for (int i = 4; i >= 0; i--){displayBaris(h[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'i'){for (int it = 4; it >= 0; it--){displayBaris(i[it]);delayMicroseconds(delayTime);}displayBaris(0);}
    if (c == 'j'){for (int i = 4; i >= 0; i--){displayBaris(j[i]);delayMicroseconds(delayTime);}displayBaris(0);}
    delay(charBreak);
    }

  2. Zevince Wahidz

    void loop(){
    DateTime now = RTC.now();
    //============ BACA RTC ==================
    int jam = now.hour();
    int menit = now.minute();
    int detik = now.second();
    int tgl = now.day();
    int bulan = now.month();
    int tahun = now.year();
    //**************JAM*******************
    if (jam > 12) {jam = jam - 12;}
    int jam1 = jam/10;
    if (jam1 == 0) jam1 = '0';
    if (jam1 == 1) jam1 = '1';
    if (jam1 == 2) jam1 = '2';
    int jam2 = jam%10;
    if (jam2 == 1) jam2 = '1';
    if (jam2 == 2) jam2 = '2';
    if (jam2 == 3) jam2 = '3';
    if (jam2 == 4) jam2 = '4';
    if (jam2 == 5) jam2 = '5';
    if (jam2 == 6) jam2 = '6';
    if (jam2 == 7) jam2 = '7';
    if (jam2 == 8) jam2 = '8';
    if (jam2 == 9) jam2 = '9';
    if (jam2 == 0) jam2 = '0';
    //**************MENIT*******************
    int menit1 = menit/10;
    if (menit1 == 0) menit1 = '0';
    if (menit1 == 1) menit1 = '1';
    if (menit1 == 2) menit1 = '2';
    if (menit1 == 3) menit1 = '3';
    if (menit1 == 4) menit1 = '4';
    if (menit1 == 5) menit1 = '5';
    int menit2 = menit%10;
    if (menit2 == 1) menit2 = '1';
    if (menit2 == 2) menit2 = '2';
    if (menit2 == 3) menit2 = '3';
    if (menit2 == 4) menit2 = '4';
    if (menit2 == 5) menit2 = '5';
    if (menit2 == 6) menit2 = '6';
    if (menit2 == 7) menit2 = '7';
    if (menit2 == 8) menit2 = '8';
    if (menit2 == 9) menit2 = '9';
    if (menit2 == 0) menit2 = '0';
    //**************DETIK*******************
    int detik1 = detik/10;
    if (detik1 == 0) detik1 = '0';
    if (detik1 == 1) detik1 = '1';
    if (detik1 == 2) detik1 = '2';
    if (detik1 == 3) detik1 = '3';
    if (detik1 == 4) detik1 = '4';
    if (detik1 == 5) detik1 = '5';
    int detik2 = detik%10;
    if (detik2 == 1) detik2 = '1';
    if (detik2 == 2) detik2 = '2';
    if (detik2 == 3) detik2 = '3';
    if (detik2 == 4) detik2 = '4';
    if (detik2 == 5) detik2 = '5';
    if (detik2 == 6) detik2 = '6';
    if (detik2 == 7) detik2 = '7';
    if (detik2 == 8) detik2 = '8';
    if (detik2 == 9) detik2 = '9';
    if (detik2 == 0) detik2 = '0';
    //============TANGGAL===============
    int tgl1 = tgl/10;
    if (tgl1 == 0) tgl1 = 'j';
    if (tgl1 == 1) tgl1 = 'a';
    if (tgl1 == 2) tgl1 = 'b';
    if (tgl1 == 3) tgl1 = 'c';
    int tgl2 = tgl%10;
    if (tgl2 == 1) tgl2 = 'a';
    if (tgl2 == 2) tgl2 = 'b';
    if (tgl2 == 3) tgl2 = 'c';
    if (tgl2 == 4) tgl2 = 'd';
    if (tgl2 == 5) tgl2 = 'e';
    if (tgl2 == 6) tgl2 = 'f';
    if (tgl2 == 7) tgl2 = 'g';
    if (tgl2 == 8) tgl2 = 'h';
    if (tgl2 == 9) tgl2 = 'i';
    if (tgl2 == 0) tgl2 = 'j';
    //============BULAN===============
    int bln1 = bulan/10;
    if (bln1 == 0) bln1 = 'j';
    if (bln1 == 1) bln1 = 'a';
    int bln2 = bulan%10;
    if (bln2 == 1) bln2 = 'a';
    if (bln2 == 2) bln2 = 'b';
    if (bln2 == 3) bln2 = 'c';
    if (bln2 == 4) bln2 = 'd';
    if (bln2 == 5) bln2 = 'e';
    if (bln2 == 6) bln2 = 'f';
    if (bln2 == 7) bln2 = 'g';
    if (bln2 == 8) bln2 = 'h';
    if (bln2 == 9) bln2 = 'i';
    if (bln2 == 0) bln2 = 'j';
    //============TAHUN===============
    int thn1 = (tahun%100)/10;
    if (thn1 == 1) thn1 = 'a';
    if (thn1 == 2) thn1 = 'b';
    if (thn1 == 3) thn1 = 'c';
    if (thn1 == 4) thn1 = 'd';
    if (thn1 == 5) thn1 = 'e';
    if (thn1 == 6) thn1 = 'f';
    if (thn1 == 7) thn1 = 'g';
    if (thn1 == 8) thn1 = 'h';
    if (thn1 == 9) thn1 = 'i';
    int thn2 = (tahun%100)%10;
    if (thn2 == 1) thn2 = 'a';
    if (thn2 == 2) thn2 = 'b';
    if (thn2 == 3) thn2 = 'c';
    if (thn2 == 4) thn2 = 'd';
    if (thn2 == 5) thn2 = 'e';
    if (thn2 == 6) thn2 = 'f';
    if (thn2 == 7) thn2 = 'g';
    if (thn2 == 8) thn2 = 'h';
    if (thn2 == 9) thn2 = 'i';
    if (thn2 == 0) thn2 = 'j';
    int lama = 2; // agar tulisan tdk bergetar karena motor putarannya tdk stabil
    while (lama >0) {
    iR = digitalRead(sensor);
    if(iR==HIGH){
    digitalWrite(LED8, HIGH);
    displayChar(jam1); //digit 1
    displayChar(jam2); //digit 2
    displayChar(':');
    displayChar(menit1); //digit 3
    displayChar(menit2); //digit 4
    displayChar(':');
    displayChar(detik1); //digit 5
    displayChar(detik2); //digit 6
    displayChar(' ');
    displayChar(' ');
    displayChar(thn2); //digit 8
    displayChar(thn1); //digit 7
    displayChar('j'); //digit 6
    displayChar('b'); //digit 5
    displayChar('-');
    displayChar(bln2); //digit 4
    displayChar(bln1); //digit 3
    displayChar('-');
    displayChar(tgl2); //digit 2
    displayChar(tgl1); //digit 1
    delayMicroseconds(1);
    lama --;
    }
    }
    }

  3. Zai Luph Syafa Unyunyunyu

    Yg kayak gini kalo di simulasi pakai PROTEUS bisa nggak ya? Menggunakan dot matrix dan ic 4017 sbg ganti spinning MOTOR

  4. Zai Luph Syafa Unyunyunyu

    Pake mikon jadul AT89S52.
    Itu dah dpt file matengannya aja brupa HEX.

    jadi gak bisa belajar dari nol. Soale waktu itu dikejar TARGET agustusan jadi gk sempet belajar CODING. HHHHH...

    Smua file pcb skema dll ada di file grup. Cari dg kata kunci. PROPELLER CLOCK

  5. Zai Luph Syafa Unyunyunyu

    Ya beda kang. Seri MCS Dg AVR sangat 2 beda. Dari segi arsitektur, register dan perintaj yg di pakai sangt beda.

    Klo.sesam.AT89xxx bisa contoh At 89C52 Bsa utk AT89S52 dan sebaliknya. Begitu pula AT89S55 bisa jg di pakai di 89S51 beda cuma kapasitas Ram dan ROM AJA.

    klo seri AVR sprti.ATMEGA gk.bisa.

Leave a Reply