Library for the TM1637 4 digits display connected to a Raspberry Pi.
The library supports digits 0 - 9 and the clock point ":" and is based upon the jPi4J library.
The file attached contains the library source, library jar&xml, examples basic functions, clock, Raspberry Pi CPU temperature.
Prototype with the Clock Example
Wiring used:
TM1637 DIO Pin = wPi 28 = Raspberry Pi Pin 38
TM1637 CLK Pin = wPi 29 = Raspberry Pi Pin 40
Example showing the Library Routines
ChangeLog
20170228 v1.0
The library supports digits 0 - 9 and the clock point ":" and is based upon the jPi4J library.
The file attached contains the library source, library jar&xml, examples basic functions, clock, Raspberry Pi CPU temperature.
Prototype with the Clock Example
Wiring used:
TM1637 DIO Pin = wPi 28 = Raspberry Pi Pin 38
TM1637 CLK Pin = wPi 29 = Raspberry Pi Pin 40
Example showing the Library Routines
B4X:
Sub Process_Globals
Private tm As TM1637
Private pinData As Byte = 28 'DIO
Private pinClock As Byte = 29 'CLK
End Sub
Sub AppStart (Args() As String)
tm.Initialize(pinData, pinClock)
Tests
StartMessageLoop
End Sub
Sub Tests
tm.Brightness = tm.BRIGHTDARKEST
tm.ShowDoublePoint = False
tm.DisplayDigits(Array As Int(1,9,5,8))
tm.Delay(2000)
tm.Brightness = tm.BRIGHTHIGHEST
tm.Clear
tm.DisplayDigit(1,1)
tm.Delay(1000)
tm.DisplayDigit(2,9)
tm.Delay(1000)
tm.DisplayDigit(3,5)
tm.Delay(1000)
tm.DisplayDigit(4,8)
End Sub
ChangeLog
20170228 v1.0
Attachments
Last edited: