+21622886281
Micro:bit TM1637 display

Create a stopwatch with Micro:bit and display TM1637

A stopwatch is a timer device that can be used to measure the amount of time that has elapsed between the start and stop of the timer. Stopwatches can be mechanical, electronic, or software-based.

Purpose of this tutorial:

In this tutorial we will see how to create a stopwatch with the micro:bit card and the TM1637 display:

  • When you press the A button of the Micro:bit, the stopwatch is triggered.
  • When the Micro:bit B button is pressed, the stopwatch stops and returns to the value 0.

Required Components

Micro:bit

The BBC micro:bit is a small computing device developed by the BBC for use in computer education in the UK. It is a small, self-contained computer with an ARM Cortex-M0 processor, a 5×5 LED matrix, two buttons, and various sensors and input/output (I/O) devices. It is programmed using a web-based code editor and can be used to create a wide variety of interactive projects, such as games, displays, and sensors. The micro:bit is designed to be easy to use and accessible to beginners, with a focus on hands-on, experiential learning. It is also designed to be highly customizable and can be extended using various add-on boards and hardware.

Micro:bit GPIO Board T

A Micro:bit GPIO board is a type of expansion board that connects to the Micro:bit and provides additional input/output capabilities. They are often used to interface the Micro:bit with external devices such as sensors, actuators, or other electronics. They typically include a set of connectors, such as pins or sockets, that can be used to connect the Micro:bit to external devices, and may also include additional features such as power rails or built-in components. These boards can help to make the development of physical computing projects with the Micro:bit easier and more accessible by providing a variety of connectors and power options.

TM1637 display

The TM1637 display is a type of LED display module that can be used to display digits and some characters. It is a 4-digit 7-segment LED display that can be controlled by a microcontroller, such as an Arduino. The TM1637 display module typically includes a LED driver IC, a key scan IC, and a common anode 4-digit 7-segment LED display.

The TM1637 display module has four pins: VCC, GND, DIO, and CLK. The VCC and GND pins are connected to a power source (usually 3.3V or 5V), the DIO pin is a bidirectional data pin that is connected to a digital I/O pin on the microcontroller, and the CLK pin is connected to a digital I/O pin on the microcontroller.

The TM1637 display can be controlled by using a library that provides functions to set the brightness, set the display content, and control the display. The library can be downloaded from the internet, and it can be installed in the Arduino development environment.

The TM1637 display can be used for a variety of applications, such as displaying the time, temperature, or other numerical data. It can also be used as a part of the stopwatch, where the elapsed time can be displayed on the 4-digit 7-segment LED display.

connecting wires

Connecting wires are used to connect various components in an electronic circuit. They allow for the transfer of electricity, data, or signals between different devices and components.

When connecting wires to an Arduino or other microcontroller, it is important to pay attention to the correct pinout. The pinout refers to the arrangement of pins on the microcontroller and the corresponding function of each pin. The Arduino pinout can be found in the documentation provided by the manufacturer, or in various resources available online.

test plate

A test plate, also known as a test jig, is a device used to test electronic circuits and components. It is a board or plate that has been designed to hold and connect various components and devices in a specific configuration, allowing for the easy testing and measurement of their performance.

A test plate can be used to test various types of electronic circuits and components, such as microcontrollers, sensors, and actuators. It typically includes connectors and sockets for connecting wires, power supply and measurement devices such as multimeters, oscilloscopes, and power supplies.

Mounting

To complete the mounting, connect:

  • the VCC pin of the display to the 3.3V pin of the micro:bit.
  • The GND pin from the display to the micro:bit GND pin
  • The DIO pin from the display to the micro:bit adapter pin P1
  • The CLK pin from the display to the micro:bit adapter pin P2

There are several mounting methods.

Mounting (1)

Mounting (2)

Makecode program

Here is the makecode program that allows you to create a stopwatch and display it on the TM1637 display.

Note: You must go to Extensions to import the TM1637 extension.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top