led_tm1637_iso

LED display TM1637

The TM1637 LED display is a smart solution for projects that require simple and clear display of numerical data. It allows easy connection via dupont wires and immediate display of values using the micro:bit in the MakeCode environment. Try displaying temperature, time, score or other data and learn the basics of programming, electronics and working with output elements in a fun way.

Description

The TM1637 LED display is a simple output module that allows you to clearly display numerical values using a four-digit seven-segment display. It is ideal for projects that need to display data such as temperature, time, scores or other measured values. Thanks to the dupont wires, you can easily connect it to the micro:bit via an expansion board.

Specifications

  • Type: 7-segment display, four digits
  • Control chip: TM1637
  • Power voltage: 3,3-5 V
  • Interface: 2 wires (DIO, CLK)
  • Pins: VCC, GND, DIO, CLK
  • Module dimensions: 42 × 24 × 12 mm

Connection

  • CLK – clock signal, connects to yellow bar on the extensions. It is necessary to set which pin we connected this signal to.
  • GOD – data pin, connects to yellow bar on the extensions. It is necessary to set which pin we connected this signal to using the dupont cable.
  • VCC – positive voltage (connects to the white bar).
  • GND – earth (connects to the black bar).


Warning: When connecting, the expansion board must be turned off and the micro:bit disconnected from the power supply.

Programme

Basic program

First, we need to create a new variable, which we will name display.

Then we need to download the extension for our display. In the extensions section we find the library for the TM1637 display and add it to the makecode.

Now we have everything ready and we can start programming. The first thing we do when starting the program is to add a display to the program and turn it on. The display is set using the variable block “set display to 0”, which we place in the “at startup” window. Next, we select the initialization block from the TM1637 block to tell where the display is connected.

Once the display is set up, we turn it on using the “turn on” block and select the “display” variable.

Then we can test the correctness of the connection and programming using the “show number” block, which can be found in the TM1637 tab.

Tasks

Task 1: Writing out the number

To work with an external display, we need to use the blocks from the bookmark TM1637, which we will install first.
Using the appropriate blocks from the bookmark TM1637 then we display different numbers on the display.

Task 2: Changing the display brightness

Find a block that can be used to change the brightness settings of the LED display. Think about the occasion when we would need the intensity
change or even reduce it completely. Find out what the highest and lowest intensity values are.

Task 3: Simple stopwatch

If we already know how to display numbers, we can use simple variable manipulation to program a stopwatch. We will create a new
a variable named numberWe will repeatedly add the value to this variable 1 and her
value on the display. However, we find that the calculation is too fast - what do we need to add to the program to
Did the stopwatch measure time accurately?