def init_streamdeck(): deck = DeviceManager().enumerate()[0] deck.open() deck.reset()
# "default", # "default", # "default", # ] # sd.putStringArray("Icons", a) buttons = [] for i in range(0, 15): sd.putBoolean(f"Action/{i}", False) sd.putBoolean(f"Status/{i}", False) button = Button(i) buttons.append(button) deck = DeviceManager().enumerate()[0] deck.open() deck.reset() print("Opened '{}' device (serial number: '{}')".format( deck.deck_type(), deck.get_serial_number())) # Set initial screen brightness to 30%. deck.set_brightness(30) # Set initial key images. # for key in range(deck.key_count()): # update_key_image(deck, key, False) # Register callback function for when a key state changes. deck.set_key_callback(key_change_callback) while True: for button in buttons: