# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import gc
import webrepl

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.ifconfig(('192.168.0.32','255.255.255.0','192.168.0.1','192.168.0.1'))
    sta_if.connect('botdemy','jins00xx')
    while not sta_if.isconnected():
      pass
  print('network config:', sta_if.ifconfig())

do_connect()
webrepl.start()
gc.collect()
