Approved content
The content below is provided by a partner.
makecode Four Digit Display (TM1637) Package for microbit
LED Digit Display Module with 1-6 (normal four) 7-segment LED, it can show number. It has TM1637 chip inside, control with a 2-wire interface.
Author: shaoziyang
Date: 2018.Mar
open your microbit makecode project, in Add Package, paste
https://github.com/microbit-makecode-packages/TM1637
to search box then search.
create(clk: DigitalPin, dio: DigitalPin, intensity: number, count: number)
create a TM1637 object.
on()
turn on the display.
off()
turn off the display.
clear()
clear content of the display.
showbit(num: number, bit: number)
show a digit number in given position.
showNumber(num: number)
show a interger number in display.
showHex(num: number)
show a hex number.
showDP(bit: number, show: boolean)
show or hide dot piont in give bit
bit is dot piont position, [0 - count]
show, True will show DP, other will hide it
intensity(dat: number)
set display intensity.
MIT
Copyright (c) 2018, microbit/micropython Chinese community
From microbit/micropython Chinese community
TM1637=github:makecode-extensions/tm1637#v1.0.0