print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
attempts=12# 60 seconds
found=False
forattemptinrange(1,attempts+1):
print("Searching for keyboard in bootloader mode (%i/%i) ... "%(attempt,attempts),end='')