Last active
April 16, 2024 16:36
-
-
Save nicman23/bb0663d52e0ae726125fd2591f2e5b65 to your computer and use it in GitHub Desktop.
a modchip for w6d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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