Exemple #1
0
# Display5f.py
# Return value from toRight

from TM1637 import FourDigit
from time import sleep

d = FourDigit()
d.show("0123456789")
sleep(2)
nb = 1
while nb > 0:
    nb = d.toRight()
    print(nb)
    sleep(1)
d.show("donE")
Exemple #2
0
# Display5a.py

from TM1637 import FourDigit
from time import sleep
        
d = FourDigit()
d.erase()
sleep(2)
d.show("0123")
sleep(3)
d.setColon(True)
d.show("ABCD")
sleep(3)
d.setColon(False)
d.setLuminosity(7) # range 0..7
d.show("donE")
Exemple #3
0
# Display5g.py
# Example scrolling text

from TM1637 import FourDigit
from time import sleep

d = FourDigit()
d.show("HELLo PYthon")
sleep(1)
while True:
    nb = 1
    while nb > 0:
        nb = d.toLeft()
        sleep(0.5)
    sleep(1)
    d.toStart()
    sleep(1)
Exemple #4
0
import os
import time
from TM1637 import FourDigit
import datetime

d = FourDigit(dio=38,clk=40,lum=1)
currentDT = datetime.datetime.now()
d.show (currentDT.hour,currentDT.minute)
d.erase()


Exemple #5
0
# Display5i.py
# count 

from TM1637 import FourDigit
        
d = FourDigit()

while True:
    for n in range(10000):
        d.show(n)

Exemple #6
0
# Display5b.py
# Shift

from TM1637 import FourDigit
from time import sleep

d = FourDigit()
d.show("0123")
sleep(2)
d.show("0123", 2)
sleep(2)
d.show("0123", -2)
sleep(2)
d.show("donE")