Skip to content

Commit

Permalink
Badger 2040W: Leaner startup for #6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Mar 21, 2023
1 parent e82478b commit 516974d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions firmware/PIMORONI_BADGER2040W/lib/badger2040.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import machine
import micropython
from picographics import PicoGraphics, DISPLAY_INKY_PACK
import network
from network_manager import NetworkManager
import WIFI_CONFIG
import uasyncio
import time
import gc
import wakeup
import pcf85063a

Expand Down Expand Up @@ -234,12 +229,19 @@ def status_handler(self, mode, status, ip):
self.update()

def isconnected(self):
import network
return network.WLAN(network.STA_IF).isconnected()

def ip_address(self):
import network
return network.WLAN(network.STA_IF).ifconfig()[0]

def connect(self):
from network_manager import NetworkManager
import WIFI_CONFIG
import uasyncio
import gc

if WIFI_CONFIG.COUNTRY == "":
raise RuntimeError("You must populate WIFI_CONFIG.py for networking.")
self.display.set_update_speed(2)
Expand Down

0 comments on commit 516974d

Please sign in to comment.