Experiment 3 MSK Raspberry 7SegDisplay
Experiment 3 MSK Raspberry 7SegDisplay
Display.Clear() - Makes the display empty if individual LEDs are still active.
Display.SetBrightnes(x) - After this you can adjust the brightness of the display,
minimum 0 and maximum 7.
Display.ShowDoublepoint(status) - Control for the ':' between the second and third
digit, true (1) = on / false (0) = off.
TM1637 script
wget https://raspberrytips.nl/files/tm1637.py
# https://raspberrytips.nl
import sys
import time
import datetime
import RPi.GPIO as GPIO
import tm1637
Display = tm1637.TM1637(23,24,tm1637.BRIGHT_TYPICAL)
Display.Clear()
Display.SetBrightnes(1)
TM1637 script
while(True):
now = datetime.datetime.now()
hour = now.hour
minute = now.minute
second = now.second
currenttime = [ int(hour / 10), hour % 10, int(minute / 10), minute % 10 ]
Display.Show(currenttime)
Display.ShowDoublepoint(second % 2)
time.sleep(1)
Er. Manoj S. Kavedia