Skip to content

Instantly share code, notes, and snippets.

@Tilka
Last active November 15, 2025 17:33
Show Gist options
  • Select an option

  • Save Tilka/7207d1cb1436e6c4279aa0b69ecb8f43 to your computer and use it in GitHub Desktop.

Select an option

Save Tilka/7207d1cb1436e6c4279aa0b69ecb8f43 to your computer and use it in GitHub Desktop.
MicroPython script to let a Starlight Wii boot, replacing the serial connection to the controller select board
from machine import Pin, UART
from neopixel import NeoPixel
# RGB pin for RP2040-Zero
rgb = Pin(16, Pin.OUT)
np = NeoPixel(rgb, 1)
uart0 = UART(0, baudrate=19200, tx=Pin(0), rx=Pin(1))
red = (10, 0, 0)
green = (0, 10, 0)
blue = (0, 0, 10)
black = (0, 0, 0)
while True:
np[0] = blue
np.write()
state = 0
while True:
b = uart0.read(1)
if b is None:
continue
print('got', b.hex())
if b[0] == 0xFF:
break
if b[0] in (0xFC, 0xFD, 0x97):
np[0] = black if np[0] == green else green
else:
np[0] = red
np.write()
result = bytes([state ^ 0x6A])
print('sending', result.hex())
uart0.write(result)
state = (state + b[0]) & 0xFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment