Purpose of this tutorial:
In this tutorial we will see how to create a stopwatch with the micro:bit card and an LCD 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.
Required Components
- Micro:bit
- LCD Display
- GPIO Expansion Board
- Connection Wires
Mounting
To perform the assembly, connect:
- the VCC pin of the display to an energy of 5V-9V .
- Pin GND from display to pin GND of micro:bit
- Pin SCL from LCD display to pin 19 of micro:bit
- Pin SDA from LCD display to pin 20 of micro:bit
There are several mounting methods.
Makecode program
Here is the makecode program that allows you to create a stopwatch and display it on an LCD display.
Note: you must go to Extensions to import the I2c_LCD1602 extension.