# WiFiBoyMini WiFi Network Example
#
# (Star Wars text version movie)
#
# before running this example, please enlarge your terminal space
#
# import network
#

def do_connect():
    import network
    sta_if = network.WLAN(network.STA_IF)
    if not sta_if.isconnected():
        print('connecting to network...')
        sta_if.active(True)
        sta_if.connect('lailab9', '26333256') # your AP/password
        while not sta_if.isconnected():
            pass
    print('network config:', sta_if.ifconfig())

#
#do_connect() 
#
do_connect()

# Star War Text Movie

import socket
addr_info = socket.getaddrinfo("towel.blinkenlights.nl", 23)
addr = addr_info[0][-1]
s = socket.socket()
s.connect(addr)
while True:
    data = s.recv(500)
    print(str(data, 'utf8'), end='')
  