Subversion Repositories Code-Repo

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
265 Kevin 1
from cube import *
2
import animations
3
from time import sleep
4
 
5
if __name__ == '__main__':
6
    # Put the cube into ethernet mode
7
    print "Initializing cube. Wait 6 seconds...\n"
8
    # cube_init()
9
 
10
    # ----- Begin animations -----
11
 
12
    cube_clear()
13
    cube_update_text("CCM LAB      ", 0xFF, 0xFF, 0xFF, 100)
14
 
15
    print "Looping animations...\n"
16
    while(1):
17
 
18
# 	for i in range(9):
19
# 	    cube_clear()
20
# 	    cube_update_sphere(i, 0xFF, 0x00, 0x00)
21
# 	    sleep(0.1)
22
 
23
	cube_update_waterfall(1, 2, 3, 4, 5, 6, 7, 8)
24
	sleep(0.1)
25
 
26
        # #cube_update_pixel(x, y, z, r, g, b)
27
        # for x in range(8):
28
        #     for y in range(8):
29
        #         for z in range(8):
30
        #             cube_update_pixel(x, y, z, 255, 255, 255)
31
        #             time.sleep(0.11)
32
        #             cube_update_pixel(x, y, z, 0, 0, 0)
33
        #             time.sleep(0.1)
34
        #             #time.sleep(0.1)
35
 
36
 
37
 
38
 
39
    # ----- End Animations -----
40
 
41
    # Reset the cube into idle mode (optional)
42
    print "Animations done. Returning board to idle mode..."
43
    cube_reset()
44