Toggle Navigation
Hatchery
Eggs
IPconfig
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import wifi, usocket, rgb wifi.connect() rgb.clear() rgb.setfont(rgb.FONT_6x3) rgb.text("WiFi...") _ = wifi.wait() rgb.clear() rgb.setfont(rgb.FONT_7x5) addr = usocket.getaddrinfo("0.0.0.0",1234)[0][-1] sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP) sock.bind(addr) ip = wifi.sta_if.ifconfig()[0] print("IP: " + ip) rgb.scrolltext(ip)