Skip to content

makecode-extensions/TM1637

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

LED Digit Display Module (TM1637)

Resources

License

Stars

Watchers

Forks

Packages

No packages published