Skip to main content

Meadow.Foundation.Displays.Tm1637

Tm1637
StatusStatus badge: working
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Displays.Tm1637

The TM1637 is a led driver and keyboard scan interface. However, this chip is almost exclusively found pre-assembled with with 4 7-segment displays.

Purchasing

Code Example

Tm1637 display;

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");

display = new Tm1637(Device.Pins.D02, Device.Pins.D01);

display.Brightness = 7;
display.ScreenOn = true;

return Task.CompletedTask;
}

public override Task Run()
{
display.Clear();

var chars = new Character[] { Character.A, Character.B, Character.C, Character.D };

display.Show(chars);

return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a TM1637 to your Meadow board, connect the following:

TM1637Meadow Pin
GNDGND
VCC3V3
SCLD08 (SCL Pin)
SDAD07 (SDA Pin)

Wiring a TM1637 to a Meadow F7

Class Tm1637

Represents Tm1637 segment display

Assembly: Tm1637.dll
View Source
Declaration
public class Tm1637 : IDisposable

Implements:
System.IDisposable

Properties

MAX_SEGMENTS

Max segments for a TM1637 controller

View Source
Declaration
public byte MAX_SEGMENTS { get; }

SegmentOrder

Order of segments

View Source
Declaration
public byte[] SegmentOrder { get; set; }

ScreenOn

Set the screen on or off

View Source
Declaration
public bool ScreenOn { get; set; }

Brightness

Adjust the screen brightness from 0 to 7

View Source
Declaration
public byte Brightness { get; set; }

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

Methods

Show(ReadOnlySpan<Character>)

Displays a series of prebuilt characters including the dot or not You can build your own characters with the primitives like Bottom, Top, Dot

View Source
Declaration
public void Show(ReadOnlySpan<Character> data)
Parameters
TypeNameDescription
System.ReadOnlySpan<Meadow.Foundation.Displays.Character>dataThe Character to display

Show(byte, Character)

Displays a raw data at a specific segment position from 0 to 5

View Source
Declaration
public void Show(byte index, Character character)
Parameters
TypeNameDescription
System.ByteindexThe segment position from 0 to 5
Meadow.Foundation.Displays.CharactercharacterThe segment characters to display

Clear()

Clear the display

View Source
Declaration
public void Clear()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements

  • System.IDisposable