How to use 4-digit LED TM1637 display with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มิ.ย. 2020
  • This video is a tutorial on how to use TM1637 displays with Arduino.
    It breaks down the demo scketch provided with TM1637Display.h library.
    The display can be purchased at:
    pl.aliexpress.com/item/328717...
    The library can be downloaded from:
    github.com/avishorp/TM1637
    Test code can be found at:
    github.com/avishorp/TM1637/bl...
    If you like this content and you want to support me in creating similar videos go to my Patreon webpage
    / mariosideas
    Or
    www.paypal.com/cgi-bin/webscr...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 76

  • @rollover36
    @rollover36 3 ปีที่แล้ว +4

    I liked the way you showed each running piece of code while running the test, good work sir, ty

  • @maxdre433
    @maxdre433 3 ปีที่แล้ว +1

    frckin loved that you did an understandable example in the end

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว

      Glad you found it helpful:)

  • @Eurus721
    @Eurus721 10 หลายเดือนก่อน

    Best video on this display I’ve ever seen. Helped so much being able to see the code as the program was running. Thanks for so much effort into this very useful video.

    • @marios_ideas
      @marios_ideas  9 หลายเดือนก่อน

      You are too kind;) Consider supporting my channel

  • @SebaSpeed
    @SebaSpeed 3 ปีที่แล้ว +2

    Very good tutorial, thanks bud!!

  • @u1kim
    @u1kim ปีที่แล้ว +1

    Thanks for the tutorial. Even after two years since this tutorial, there's still no definitive reference I can find on TM1637 on Arduino, and this video is about the only piece that shows the placement of decimal point. However, I'm still struggling with formatting floating point numbers with specific decimal point placement. For instance, how would you write the parameters to display four digit number with one of them after the DP? e.g. displaying a variable named data with a value of 123.4?

  • @jeffbeck6501
    @jeffbeck6501 2 ปีที่แล้ว

    It was so good, the video that is, that I had to subscribe. Great job man.

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว

      Thx. Also give video a like to help to promote it:)

  • @anokhautomation4453
    @anokhautomation4453 2 ปีที่แล้ว

    Useful tutorial.thanks for sharing.

  • @passibharat
    @passibharat 2 ปีที่แล้ว

    Very good explanation

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว

      Give video a like if you enjoyed it:) Helps me a lot. I also have some OLED display tutorials you may find useful

  • @knerduno5942
    @knerduno5942 3 ปีที่แล้ว

    So I ordered two of these, and not from Alixpress as I did not want to wait 1-6 months for delivery. First one i got, I realized after does not have decimals between the numbers. I had to remove the in your code for the display to show numbers correctly. The other one does have decimals, and is similar to the larger one you have here, even with similar markings. Not only is it not displaying decimals, it is only showing a single 0. Advice on that?

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว +1

      I am afraid it would be difficult for me to support here.
      Maybe you have some other type that does not work well with that library. Displaying just a zero when you clearly attempt to display a different content is not a good sign

    • @knerduno5942
      @knerduno5942 3 ปีที่แล้ว

      @@marios_ideas Okay. I will give the other libraries I try. Thanks!

  • @selimcanovur587
    @selimcanovur587 7 วันที่ผ่านมา

    Hello, I could not trust most of the products, some seems like dots are available but actually not connected physically to the module. Can you suggest me a product with the decimal points, which I can drive with tm1637 ? Because I wrote my own library for raspberry pi and everything works fine except the decimal points. Some of the products work like a timing module even though they have decimal segments.

    • @marios_ideas
      @marios_ideas  7 วันที่ผ่านมา

      I can't. The one I used in the video was purchased in the large selection of components. And If I need to use this display stick to this one:) Find a local electronic shop , not the online shop. If this is not what is advertised you can simply return it.

  • @brotherdevastro393
    @brotherdevastro393 2 ปีที่แล้ว

    can i change the 7 segment to 2.3 inch seven segment with 7Volt Supply?

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว

      Inspect the part and it has a microchip TM1637 on it then you can. So you power from 7 v but connect 5v logic from arduino to the signal pins to control it.

  • @chbonnici
    @chbonnici 2 ปีที่แล้ว

    Very nicer thank you.

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว

      Thx:)Give video a like if you enjoyed it. It helps to grow my channel

  • @lolleepop
    @lolleepop 2 ปีที่แล้ว

    How to make the display show the variable. Im making a distance measuring system and I want to display the output number to this type of displays. Plz help

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว

      I have one video where I am working displaying time on this display. Please check how I displayed variable there th-cam.com/video/brTnEEJBFZM/w-d-xo.html

  • @andrasparanici5491
    @andrasparanici5491 3 ปีที่แล้ว

    Nice!

  • @abdulqadirahmedli610
    @abdulqadirahmedli610 ปีที่แล้ว

    Çox sağ olun. Mənə InşəAllah kömək etdi.

  • @safadelican
    @safadelican 3 ปีที่แล้ว

    THANKS

  • @user-xb5zu6zu7j
    @user-xb5zu6zu7j 3 ปีที่แล้ว

    How did you fix dot issue?

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว +3

      By using clock.showNumberDecEx((int)myRTC.hours/10*1000+(myRTC.hours-((int)myRTC.hours/10)*10)*100+ (int)myRTC.minutes/10*10+myRTC.minutes-((int)myRTC.minutes/10)*10, (0x80 >> 1), true);
      In that command (0x80 >> 1) is responsible for displaying the colon. Mind you you have to have a specific TM1637 display. There ones meant for displaying decimal numbers and they have dots and there are ones for displaying time with colons. There some that have both but then you have to experiment with different libraries. My experience is that I use either dots or columns depending on display type. I have separate video on TM1637 where this is covered

  • @PiyushRobotics
    @PiyushRobotics 11 หลายเดือนก่อน

    amazing

    • @marios_ideas
      @marios_ideas  9 หลายเดือนก่อน

      Glad you think so!

  • @coroomchannel414
    @coroomchannel414 2 ปีที่แล้ว

    How to display numbers with commas?
    For example 27.30.

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว +1

      Answer is in the video. Check timestamp 6:05. There I am displaying all the dots. There is a fourloop there using k variable. But instead of using k you can use either 3,2,1,or 0 and it will display one of the dots

    • @coroomchannel414
      @coroomchannel414 2 ปีที่แล้ว

      @@marios_ideas How to display 3 temperature numbers on seven segment?

  • @MrAlinkarl
    @MrAlinkarl 3 ปีที่แล้ว

    nice video! can u make a video a countdown timer if there is a input signal ex. sensor and give time to countdown. thanks.....

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว

      I am not sure I understand. CAnyou explain more

    • @MrAlinkarl
      @MrAlinkarl 3 ปีที่แล้ว

      @@marios_ideas if the arduino detect input sensor, then it will give time ( ex. 30 minutes) it will countdown and it will display the minutes and sec., and zero comes it will end and stay zero display. thanks for the rply

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว

      Well this is a very specific request not really good for dedicated video. What I might do in the future is to do a stopwatch and eggtimer which should give you good idea how this would work. But I do not have this project in my immediate pipeline. In a meantime you can look at the other video of mine which shows how to display time. If you can do it then all you need to do is to detect the sensor state change and record time and then show 30:00Min on the display and come up with formula which calculate the amount of time that has passed since we recorded the timestamp and substract it from 30 min. Should not be very difficult

  • @Ktos1
    @Ktos1 3 ปีที่แล้ว +1

    Dobra robota, filmik mi bardzo pomógł, szkoda że nie robisz drugiej wersji po polsku.

  • @lamse_barmajiyye
    @lamse_barmajiyye 2 ปีที่แล้ว

    How can we use this module with micro c?

    • @marios_ideas
      @marios_ideas  2 ปีที่แล้ว +1

      I have not looked at Micro C and PIC microcontrollers. Sorry

    • @lamse_barmajiyye
      @lamse_barmajiyye 2 ปีที่แล้ว

      @@marios_ideas
      OK
      thank you

  • @yuvrajsingh8901
    @yuvrajsingh8901 ปีที่แล้ว

    Can u help me

  • @eligijuspranskunas3509
    @eligijuspranskunas3509 ปีที่แล้ว

    on the code compiler it says- has no member "clear"

    • @marios_ideas
      @marios_ideas  ปีที่แล้ว

      Arduino nano or uno has only 2k of ram. Easy to go over the limit. You were adding your own code , I presume

  • @sirchannel1754
    @sirchannel1754 3 ปีที่แล้ว

    your video is amazingg sirrrr, goodjob
    can this tm1637 do the running text? if that possible can you show me the code :D

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว

      Well. You have a limited number of characters. Displaying what text did you have in mind?

  • @magnetservicecenter
    @magnetservicecenter 2 ปีที่แล้ว

    sir i am layman since age 33,now i am 43 but you are Gineous

  • @Sekhar_Home
    @Sekhar_Home 3 ปีที่แล้ว

    I want to control tm1638 without library.. is it possible. If yes then pls make a video or give me link where to get tutorial.
    Thank u in advance

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว +1

      I am not sure. I will check. Why would you want not to use the library?

    • @SebaSpeed
      @SebaSpeed 3 ปีที่แล้ว +1

      Obviously is possible but you need more code to send each bite to controller to make changes,

    • @Sekhar_Home
      @Sekhar_Home 3 ปีที่แล้ว

      @@SebaSpeed pls tell me where to follow any tutorials

    • @SebaSpeed
      @SebaSpeed 3 ปีที่แล้ว

      @@Sekhar_Home I not know any tutorial but you can start studying the datasheet and make inverse engineering to the libraries.

    • @knerduno5942
      @knerduno5942 3 ปีที่แล้ว

      Just look at the code in the library. That is what Object Orientated Programming is all about: the reuse of code.

  • @sunilkb144
    @sunilkb144 3 ปีที่แล้ว

    is all alphabets displayable .especially z,k,m,r,t,w,x,

    • @marios_ideas
      @marios_ideas  3 ปีที่แล้ว

      Nope . You cant e.g make z or m or x etc

  • @mikethelittletrader2790
    @mikethelittletrader2790 ปีที่แล้ว

    If anyone is interested, here is my test code for this display to work without any library.
    #define CLK 2
    #define DIO 3
    /*
    * 0 -
    * 5 | | 1
    * 6 - 7 : only at 2nd register
    * 4 | | 2
    * 3 -
    *
    */
    #define chA 0b01110111
    #define chH 0b01110110
    #define chO 0b00111111
    #define chJ 0b00011110
    #define chBlank 0
    const byte nums[] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F};
    byte bfr[5];
    void setup() {
    Serial.begin(57600);
    pinMode(CLK, OUTPUT); // CLK
    pinMode(DIO, OUTPUT); // DIO
    digitalWrite(DIO, HIGH);
    digitalWrite(CLK, HIGH);
    }
    void loop()
    {
    SetBrightness(0);
    WriteLCD(chA, chH, chO, chJ, false);
    delay(2000);
    SetBrightness(2);
    WriteLCD(nums[0], nums[1], nums[2], nums[3], false);
    delay(2000);
    SetBrightness(4);
    WriteLCD(nums[4], nums[5], nums[6], nums[7], true);
    delay(2000);
    SetBrightness(6);
    WriteLCD(chBlank, nums[8], nums[9], chBlank, false);
    delay(2000);
    }
    void SetBrightness(byte level) // value 0 .. 7;
    {
    bfr[0] = 0b10001000 | (level & 0x07); // Display ON + jas
    SendMsg(1);
    }
    void WriteLCD(byte D0, byte D1, byte D2, byte D3, bool colon)
    {
    bfr[0] = 0b01000000; // command: write data to display
    SendMsg(1);
    bfr[0] = 0b11000000; // command: address C0H
    bfr[1] = D0;
    bfr[2] = D1 | (colon ? 0x80 : 0);
    bfr[3] = D2;
    bfr[4] = D3;
    SendMsg(5);
    }
    void SendMsg(byte byteCount)
    {
    int tmpBfr = 0;
    pinMode(DIO, OUTPUT);
    digitalWrite(DIO, LOW); // start
    digitalWrite(CLK, LOW); // clk ready
    for (int i = 0; i> 1;
    }
    digitalWrite(DIO, LOW);
    pinMode(DIO, INPUT); // waiting for ACK
    digitalWrite(CLK, HIGH);
    // test for LOW - not implemented
    digitalWrite(CLK, LOW);
    }
    pinMode(DIO, OUTPUT);
    digitalWrite(CLK, HIGH); // clk ready
    digitalWrite(DIO, HIGH); // end
    }

    • @marios_ideas
      @marios_ideas  ปีที่แล้ว

      Wooo... this code is a little over my head:) I wił have to thoroughly analyse it. Thanks for your feedback

    • @janmatlas
      @janmatlas 16 วันที่ผ่านมา

      Perfektní, děkuji!
      Použil jsem do programu pro řízení sušičky.