#!/usr/bin/env python import ws2801 import time import random w = ws2801.WS2801("192.168.23.222", 2703) w.set_fadestep(2) # dictionary which maps {module: [r, g, b]} set_colors = {} while True: r = random.randint(0, 255) g = random.randint(0, 255) b = random.randint(0, 255) for i in range(20): w.fade_color(i, r, g, b) w.commit() time.sleep(0.1) time.sleep(120)