Subversion Repositories Code-Repo

Rev

Blame | Last modification | View Log | RSS feed

from cube import *
import animations
from time import sleep

if __name__ == '__main__':
    # Put the cube into ethernet mode
    print "Initializing cube. Wait 6 seconds...\n"
    # cube_init()
    
    # ----- Begin animations -----

    cube_clear()
    cube_update_text("CCM LAB      ", 0xFF, 0xFF, 0xFF, 100)
    
    print "Looping animations...\n"
    while(1):

#       for i in range(9):
#           cube_clear()
#           cube_update_sphere(i, 0xFF, 0x00, 0x00)
#           sleep(0.1)

        cube_update_waterfall(1, 2, 3, 4, 5, 6, 7, 8)
        sleep(0.1)

        # #cube_update_pixel(x, y, z, r, g, b)
        # for x in range(8):
        #     for y in range(8):
        #         for z in range(8):
        #             cube_update_pixel(x, y, z, 255, 255, 255)
        #             time.sleep(0.11)
        #             cube_update_pixel(x, y, z, 0, 0, 0)
        #             time.sleep(0.1)
        #             #time.sleep(0.1)
    
        
    
       
    # ----- End Animations -----

    # Reset the cube into idle mode (optional)
    print "Animations done. Returning board to idle mode..."
    cube_reset()