tm1637倒计时(未完成)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# https://raspberrytips.nl/tm1637-4-digit-led-display-raspberry-pi/

import sys
import time
import datetime
import RPi.GPIO as GPIO
import tm1637

#CLK -> GPIO23 (Pin 16)
#DI0 -> GPIO24 (Pin 18)

Display = tm1637.TM1637(23,24,tm1637.BRIGHT_TYPICAL)

Display.Clear()
Display.SetBrightnes(2)
for d in range(9,-1,-1):
time.sleep(1)
#while(True):
now = datetime.datetime.now()
second = now.second
a=9
b=9
c=9

emm=[ a, b, c, d]
Display.Show(emm)
Display.ShowDoublepoint(second % 2)

#time.sleep(1)

 

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注