SHARE
TWEET

Test #1

a guest May 28th, 2016 11 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import max7219.led as led
  3. import time
  4.  
  5. device = led.matrix()
  6.  
  7. try:
  8.     while True:
  9.  
  10. # Line 0
  11.         device.pixel(0, 0, 1)
  12.         time.sleep(1)
  13.         device.pixel(0, 1, 1)
  14.         time.sleep(1)
  15.         device.pixel(0, 2, 1)
  16.         time.sleep(1)
  17.         device.pixel(0, 3, 1)
  18.         time.sleep(1)
  19.         device.pixel(0, 4, 1)
  20.         time.sleep(1)
  21.         device.pixel(0, 5, 1)
  22.         time.sleep(1)
  23.         device.pixel(0, 6, 1)
  24.         time.sleep(1)
  25.         device.pixel(0, 7, 1)
  26.         time.sleep(1)
  27.  
  28. # Line 1
  29.         device.pixel(1, 0, 1)
  30.         time.sleep(1)
  31.         device.pixel(1, 1, 1)
  32.         time.sleep(1)
  33.         device.pixel(1, 2, 1)
  34.         time.sleep(1)
  35.         device.pixel(1, 3, 1)
  36.         time.sleep(1)
  37.         device.pixel(1, 4, 1)
  38.         time.sleep(1)
  39.         device.pixel(1, 5, 1)
  40.         time.sleep(1)
  41.         device.pixel(1, 6, 1)
  42.         time.sleep(1)
  43.         device.pixel(1, 7, 1)
  44.         time.sleep(1)
  45.  
  46. # Line 2
  47.         device.pixel(2, 0, 1)
  48.         time.sleep(1)
  49.         device.pixel(2, 1, 1)
  50.         time.sleep(1)
  51.         device.pixel(2, 2, 1)
  52.         time.sleep(1)
  53.         device.pixel(2, 3, 1)
  54.         time.sleep(1)
  55.         device.pixel(2, 4, 1)
  56.         time.sleep(1)
  57.         device.pixel(2, 5, 1)
  58.         time.sleep(1)
  59.         device.pixel(2, 6, 1)
  60.         time.sleep(1)
  61.         device.pixel(2, 7, 1)
  62.         time.sleep(1)
  63.  
  64. # Line 3
  65.         device.pixel(3, 0, 1)
  66.         time.sleep(1)
  67.         device.pixel(3, 1, 1)
  68.         time.sleep(1)
  69.         device.pixel(3, 2, 1)
  70.         time.sleep(1)
  71.         device.pixel(3, 3, 1)
  72.         time.sleep(1)
  73.         device.pixel(3, 4, 1)
  74.         time.sleep(1)
  75.         device.pixel(3, 5, 1)
  76.         time.sleep(1)
  77.         device.pixel(3, 6, 1)
  78.         time.sleep(1)
  79.         device.pixel(3, 7, 1)
  80.         time.sleep(1)
  81.  
  82. # Line 4
  83.         device.pixel(4, 0, 1)
  84.         time.sleep(1)
  85.         device.pixel(4, 1, 1)
  86.         time.sleep(1)
  87.         device.pixel(4, 2, 1)
  88.         time.sleep(1)
  89.         device.pixel(4, 3, 1)
  90.         time.sleep(1)
  91.         device.pixel(4, 4, 1)
  92.         time.sleep(1)
  93.         device.pixel(4, 5, 1)
  94.         time.sleep(1)
  95.         device.pixel(4, 6, 1)
  96.         time.sleep(1)
  97.         device.pixel(4, 7, 1)
  98.         time.sleep(1)
  99.  
  100. # Line 5
  101.         device.pixel(5, 0, 1)
  102.         time.sleep(1)
  103.         device.pixel(5, 1, 1)
  104.         time.sleep(1)
  105.         device.pixel(5, 2, 1)
  106.         time.sleep(1)
  107.         device.pixel(5, 3, 1)
  108.         time.sleep(1)
  109.         device.pixel(5, 4, 1)
  110.         time.sleep(1)
  111.         device.pixel(5, 5, 1)
  112.         time.sleep(1)
  113.         device.pixel(5, 6, 1)
  114.         time.sleep(1)
  115.         device.pixel(5, 7, 1)
  116.         time.sleep(1)
  117.  
  118. # Line 6
  119.         device.pixel(6, 0, 1)
  120.         time.sleep(1)
  121.         device.pixel(6, 1, 1)
  122.         time.sleep(1)
  123.         device.pixel(6, 2, 1)
  124.         time.sleep(1)
  125.         device.pixel(6, 3, 1)
  126.         time.sleep(1)
  127.         device.pixel(6, 4, 1)
  128.         time.sleep(1)
  129.         device.pixel(6, 5, 1)
  130.         time.sleep(1)
  131.         device.pixel(6, 6, 1)
  132.         time.sleep(1)
  133.         device.pixel(6, 7, 1)
  134.         time.sleep(1)
  135.  
  136. # Line 7
  137.         device.pixel(7, 0, 1)
  138.         time.sleep(1)
  139.         device.pixel(7, 1, 1)
  140.         time.sleep(1)
  141.         device.pixel(7, 2, 1)
  142.         time.sleep(1)
  143.         device.pixel(7, 3, 1)
  144.         time.sleep(1)
  145.         device.pixel(7, 4, 1)
  146.         time.sleep(1)
  147.         device.pixel(7, 5, 1)
  148.         time.sleep(1)
  149.         device.pixel(7, 6, 1)
  150.         time.sleep(1)
  151.         device.pixel(7, 7, 1)
  152.         time.sleep(1)
  153.  
  154. except KeyboardInterrupt:
  155.         device.flush()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top