Skip to content

Instantly share code, notes, and snippets.

@nicman23
Last active April 16, 2024 16:36
Show Gist options
  • Save nicman23/bb0663d52e0ae726125fd2591f2e5b65 to your computer and use it in GitHub Desktop.
Save nicman23/bb0663d52e0ae726125fd2591f2e5b65 to your computer and use it in GitHub Desktop.
a modchip for w6d
import machine
import time
uart = machine.UART(1, baudrate=115200, tx=machine.Pin(4), rx=machine.Pin(5), timeout=20)
while True:
if uart.any():
res = uart.readline().decode('utf-8')
if 'U-Boot Boot Menu' in res:
print('yes')
uart.write('')
time.sleep(10)
else:
print(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment