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

from time import sleep
import tm1637

# Initialize the display (GND, VCC=3.3V, Example Pins are DIO-20 and CLK21)
Display = tm1637.TM1637(CLK=26, DIO=19, brightness=1.0)

# Basic Display Update:
digits = [1, 2, 3, 4]
Display.Show(digits)
print "1234  - Working? (Press Key)"
scrap = raw_input()

# Change number
digits =[5,5,5,5]
Display.Show(digits)
print "5555 -Working? (Press Key)"
scrap = raw_input()



# Update Individual Digits:
print "Updating one digit at a time:"
Display.Clear()
Display.Show1(1, 3)
sleep(0.5)
Display.Show1(2, 2)
sleep(0.5)
Display.Show1(3, 1)
sleep(0.5)
Display.Show1(0, 4)
print"4321  - (Press Key)"
scrap = raw_input()

number = [1,2,2,2]
print "Show 1222 digits"
Display.Clear()
Display.Show1(1, number[0])
sleep(0.5)
Display.Show1(2, 2)
sleep(0.5)
Display.Show1(3, 1)
sleep(0.5)
Display.Show1(0, 4)
print"4321  - (Press Key)"
scrap = raw_input()






print('done.')
Display.cleanup()
