Introduction
Besides having the onboard LED display on the micro:bit, you can also add an external display to it.
In this guide, we will use the micro:bit and an external 4 digit display to create a counter. We will use the TMP1637 package in the MakeCode editor to do this.
After completing this guide, you will have gained a basic understanding of how to use a 4 digit display module with the micro:bit.
-
-
-
-
-
-
-
-
let tm: TM1637.TM1637LEDs = null let item = 0 item = 0 tm = TM1637.create( DigitalPin.P1, DigitalPin.P2, 7, 4 )
-
let tm: TM1637.TM1637LEDs = null let item = 0 item = 0 tm = TM1637.create( DigitalPin.P1, DigitalPin.P2, 7, 4 ) basic.forever(function () { tm.showNumber(item) item += 1 basic.pause(1000) })
-
let tm: TM1637.TM1637LEDs = null let item = 0 input.onButtonPressed(Button.AB, function () { item = 0 }) item = 0 tm = TM1637.create( DigitalPin.P1, DigitalPin.P2, 7, 4 ) basic.forever(function () { tm.showNumber(item) item += 1 basic.pause(1000) })
-
let tm: TM1637.TM1637LEDs = null let item = 0 input.onButtonPressed(Button.AB, function () { item = 0 }) input.onButtonPressed(Button.B, function () { tm.off() }) item = 0 tm = TM1637.create( DigitalPin.P1, DigitalPin.P2, 7, 4 ) basic.forever(function () { tm.showNumber(item) item += 1 basic.pause(1000) })
-
let tm: TM1637.TM1637LEDs = null let item = 0 input.onButtonPressed(Button.AB, function () { item = 0 }) input.onButtonPressed(Button.B, function () { tm.off() }) input.onButtonPressed(Button.A, function () { tm.on() }) item = 0 tm = TM1637.create( DigitalPin.P1, DigitalPin.P2, 7, 4 ) basic.forever(function () { tm.showNumber(item) item += 1 basic.pause(1000) })
-