Based on this open source project: https://github.com/avishorp/TM1637
Timer example:
B4X:
Sub Process_Globals
Public Serial1 As Serial
Private tm As TM1637Display
Private timer1 As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
tm.Initialize(2, 3)
timer1.Initialize("timer1_Tick", 1000)
timer1.Enabled = True
End Sub
Sub Timer1_Tick
tm.ShowNumberDec2(Millis / 1000, True, 4, 0)
End Sub
Connections:
CLK - 2 (can be changed)
DIO - 3 (can be changed)
VCC - 5v
GND - Ground
V1.20 (updated by rwblinn): https://www.b4x.com/android/forum/threads/tm1637-4-digits-display.67733/#post-477687
Attachments
Last edited: