def main(): try: #global freqs init_freqs() master.setup() #print(freqs) inner() finally: GPIO.cleanup()
mini_display = totalwidth/cols, totalheight/rows master = Process(target = master.setup, args = [ip, port, big_display, mini_display]) master.start() else: TOTAL_WIDTH = 1920 * 5 TOTAL_HEIGHT = 1200 * 3 mini_display = 1920, 1200 COLS = 5 ROWS = 3 name = platform.node() print not name.startswith('tile-') ip = "10.10.0.255" if name == 'master': master.setup(ip, port, (TOTAL_WIDTH, TOTAL_HEIGHT), mini_display) elif True: 'pong running on odd computer' else: xcoord = int(name[5]) ycoord = int(name[7]) width = TOTAL_WIDTH/COLS left = width * xcoord right = left + width height = TOTAL_HEIGHT/ROWS top = height * ycoord bot = top + height bounds = toBounds(left, right, top, bot)
def run(): master.setup(ip, port, big_display, big_display)
i += 1 big_display = (totalwidth, totalheight) mini_display = totalwidth/cols, totalheight/rows master_thread = Process(target = master.setup, args = [ip, port, big_display, mini_display, i, scale]) master_thread.start() else: TOTAL_WIDTH = 1920 * 5 TOTAL_HEIGHT = 1200 * 3 mini_display = 1920, 1200 scal = 60 COLS = 5 ROWS = 3 name = platform.node() ip = "10.0.0.10" port = 5000 if name == 'master': master.setup(ip, port, (TOTAL_WIDTH, TOTAL_HEIGHT), mini_display, 15, scale = scal) else: xcoord = int(name[5]) ycoord = int(name[7]) b = pongdisplay.Board(xcoord, ycoord, COLS, ROWS) b.setIP(ip, port) b.setDisplay(1920, 1200) b.start()