###pixels = clue.pixel pixels = neopixel.NeoPixel(board.NEOPIXEL, 1) JG_RX_COL = 0x0000ff BUTTON_Y_POS = 152 ### Inputs _button_a = digitalio.DigitalInOut(board.BUTTON_A) _button_a.switch_to_input(pull=digitalio.Pull.UP) _button_b = digitalio.DigitalInOut(board.BUTTON_B) _button_b.switch_to_input(pull=digitalio.Pull.UP) button_left = lambda: not _button_a.value button_right = lambda: not _button_b.value ##button_left = lambda: clue.button_a ##button_right = lambda: clue.button_b blankScreen(display, pixels) ### Set to True for blue flashing when devices are joining the playing group JG_FLASH = True ### TODO DISABLE THIS FOR THE ADAFRUIT RELEASE IMAGE_DIR = "rps/images" AUDIO_DIR = "rps/audio" files = (("searching", "welcome-to", "arena", "ready") + ("rock", "paper", "scissors") + ("start-tx", "end-tx", "txing") + ("rock-scissors", "paper-rock", "scissors-paper") + ("you-win", "draw", "you-lose", "error") + ("humiliation", "excellent")) gc.collect() d_print(2, "GC before SJ", gc.mem_free())
JG_RX_COL = 0x0000ff BUTTON_Y_POS = 152 ### Inputs _button_a = digitalio.DigitalInOut(board.BUTTON_A) _button_a.switch_to_input(pull=digitalio.Pull.UP) _button_b = digitalio.DigitalInOut(board.BUTTON_B) _button_b.switch_to_input(pull=digitalio.Pull.UP) button_left = lambda: not _button_a.value button_right = lambda: not _button_b.value ##button_left = lambda: clue.button_a ##button_right = lambda: clue.button_b ### This will always by the top level group passed to display.show() main_display_group = None main_display_group = blankScreen(display, pixels, main_display_group) ### TODO - need to change loads of stuff to pass main_display_group ### TODO - need to change loads of stuff to pass main_display_group ### TODO - need to change loads of stuff to pass main_display_group IMAGE_DIR = "rps/images" AUDIO_DIR = "rps/audio" ### None, None, None for no display (sprites, opp_sprites, SPRITE_SIZE) = loadSprites(display, IMAGE_DIR + "/rps-sprites-ind4.bmp") files = (("searching", "welcome-to", "arena", "ready") + ("rock", "paper", "scissors") + ("start-tx", "end-tx", "txing") + ("rock-scissors", "paper-rock", "scissors-paper") +