Internet Clock || IOT Based Clock using TM1637

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 10

  • @armanmustafa910
    @armanmustafa910 3 роки тому +1

    Amazing 😀

  • @patilabhijeetj
    @patilabhijeetj 4 місяці тому

    Great code. Thank you!!!
    Just testing at 11:45PM and continue to test.It's now 12:04 in the midnight and clock display showing _ _ : _ 4
    i.e. all first digits are blank and it just showing 4 minutes past 12 AM.
    Updates: 20 Sept 2024
    Just change line from:
    display.showNumberDecEx(A, 0b01000000 , false, 4, 0);
    To:
    display.showNumberDecEx(A, 0b01000000 , true, 4, 0); //true sets leading zero so now 12:04 (AM) will be shown as 00:04
    Complete code:
    void ShowClock() {
    timeClient.forceUpdate();
    int A, B, x, y;
    timeClient.update();
    // display.setBrightness(4); // Set the brightness:
    display.setBrightness(0x02);
    A = timeClient.getHours() * 100 + timeClient.getMinutes(); // Not using
    x = (timeClient.getHours() > 12) ? (timeClient.getHours() - 12) : (timeClient.getHours());
    y = x * 100 + timeClient.getMinutes();
    B = timeClient.getSeconds(); //Used to blink colon symbol : (HH and MM seperator)
    if ((B % 2) == 0) {
    //display.showNumberDecEx(A, 0b01000000 , false, 4, 0);
    display.showNumberDecEx(y, 0b01000000, true, 4, 0); //true sets leading zero
    } else {
    //display.showNumberDecEx(A, 0b00000000 , false, 4, 0);
    display.showNumberDecEx(y, 0b00000000, true, 4, 0);//true sets leading zero
    }

    • @patilabhijeetj
      @patilabhijeetj 4 місяці тому

      Added two new variables x and y as int with below code:
      x = (timeClient.getHours() > 12) ? (timeClient.getHours() - 12) : (timeClient.getHours());
      y = x * 100 + timeClient.getMinutes();
      Then displaying those to have 12 hours clock...
      Thank you!!!

  • @zohasaleem2234
    @zohasaleem2234 3 роки тому

    Wow sir awesome🙂

  • @learn_more77
    @learn_more77 3 роки тому +1

    can we connect ds3231

    • @ImtiazTech
      @ImtiazTech  3 роки тому

      dear there is no need to connect DS3231 it update automatically when connected to your internet

    • @learn_more77
      @learn_more77 3 роки тому

      @@ImtiazTech bt what when there is power cut n no internet

  • @fatimahehehe4938
    @fatimahehehe4938 3 роки тому

    Wowww

  • @TariqMehmood-sb5mw
    @TariqMehmood-sb5mw 3 роки тому

    Very interesting

  • @MuhammadArshad-tb9jn
    @MuhammadArshad-tb9jn 3 роки тому

    Amazing