def main_no_artsync(universe1, universe2, ip='127.0.0.1'): packet_size = 512 port = 6454 a1 = StupidArtnet(ip, port, universe1, packet_size) a2 = StupidArtnet(ip, port, universe2, packet_size) a1.flash_all() # send single packet with all channels at 255 a2.flash_all() file.write(StupidArtnet.print_object_and_packet(a1)) file.write(StupidArtnet.print_object_and_packet(a2)) a1.show() a2.show()
def main_artsync(universe1, universe2, ip='127.0.0.1', tmp=5, nb_packet=50): packet_size = 512 port = 6454 a1 = StupidArtnet(ip, port, universe1, packet_size) a2 = StupidArtnet(ip, port, universe2, packet_size) a1.flash_all() # send single packet with all channels at 255 a2.flash_all() file.write(StupidArtnet.print_object_and_packet(a1)) file.write(StupidArtnet.print_object_and_packet(a2)) group = ArtNetGroup(a1, a2) group.start(True) time.sleep(tmp) group.stop()
def main_artsync(universe1, universe2, ip='127.0.0.1', slp=5): packet_size = 512 port = 6454 sync = StupidArtSync(ip) a1 = StupidArtnet(ip, port, universe1, packet_size) a2 = StupidArtnet(ip, port, universe2, packet_size) a1.flash_all() # send single packet with all channels at 255 a2.flash_all() file.write(StupidArtnet.print_object_and_packet(a1)) file.write(StupidArtnet.print_object_and_packet(a2)) sync.send() a1.show() a2.show() time.sleep(5) sync.send()
def main_artsync(universe1, universe2, ip1='127.0.0.1', ip2='127.0.0.2', slp=5): packet_size = 512 port = 6454 a1 = StupidArtnet(ip1, port, universe1, packet_size) a2 = StupidArtnet(ip2, port, universe2, packet_size) a1.flash_all() # send single packet with all channels at 255 a2.flash_all() file.write(StupidArtnet.print_object_and_packet(a1)) file.write(StupidArtnet.print_object_and_packet(a2)) group = ArtNetGroup(a1, a2) group.show(True)
def main_no_artsync(universe, ip='127.0.0.1'): target_ip = ip packet_size = 512 port = 6454 a = StupidArtnet(target_ip, port, universe, packet_size) a.flash_all() # send single packet with all channels at 255 file.write(StupidArtnet.print_object_and_packet(a)) a.show()
def main_no_artsync(universe1, universe2, ip1='127.0.0.1', ip2='127.0.0.2', tmp=5): packet_size = 512 port = 6454 a1 = StupidArtnet(ip1, port, universe1, packet_size) a2 = StupidArtnet(ip2, port, universe2, packet_size) a1.flash_all() # send single packet with all channels at 255 a2.flash_all() file.write(StupidArtnet.print_object_and_packet(a1)) file.write(StupidArtnet.print_object_and_packet(a1)) a1.start() a2.start() time.sleep(tmp) a1.stop() a2.stop()
def main_artsync(universe, ip='127.0.0.1', nb_packet=50, tmp=5): packet_size = 512 port = 6454 a = StupidArtnet(ip, port, universe, packet_size) a.flash_all() # send single packet with all channels at 255 file.write(StupidArtnet.print_object_and_packet(a)) a.start_artSync(nb_packet) time.sleep(tmp) a.stop_artSync()
def main_artsync(universe, ip='127.0.0.1', slp=5): target_ip = ip packet_size = 512 port = 6454 sync = StupidArtSync(ip) a = StupidArtnet(target_ip, port, universe, packet_size) a.flash(255) # send single packet with all channels at 255 file.write(StupidArtnet.print_object_and_packet(a)) sync.send() a.show() sync.send()
def main_artsync(universe, start_channel, end_channel, ip='127.0.0.1', tmp=5): target_ip = ip packet_size = 512 port = 6454 a = StupidArtnet(target_ip, port, universe, packet_size) packet = Animation.anime_2(packet_size, start_channel, end_channel) a.set(packet[0]) file.write(StupidArtnet.print_object_and_packet(a)) group = ArtNetGroup(a) group.start(True) time.sleep(tmp) group.stop() group.set(bytearray(512)) group.show(True)
def write_file(self, file): [ file.write(StupidArtnet.print_object_and_packet(i)) for i in self.listArtNet ]