Skip to content
LED Digit Display Module (TM1637)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
4-LED.jpg
LICENSE
README.md
demo.jpg
icon.png
main.ts
pxt.json
test.ts

README.md

Four Digit Display (TM1637)

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

Usage

open your microbit makecode project, in Add Package, paste

https://github.com/microbit-makecode-packages/TM1637

to search box then search.

API

  • create(clk: DigitalPin, dio: DigitalPin, intensity: number, count: number)
    create a TM1637 object.

    • clk, any DigitalPin
    • dio, any DigitalPin
    • intensity, set display brightness, range [0-8]
    • count, LED count, range [1-5]
  • 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.

Demo

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

  • for PXT/microbit

From microbit/micropython Chinese community

You can’t perform that action at this time.