Skip to content

Commit 55a4bd9

Browse files
authored
Merge pull request #112 from makermelissa/master
Make use of the new PortalBase WiFi modules
2 parents c13a92b + d04c2a4 commit 55a4bd9

File tree

3 files changed

+7
-120
lines changed

3 files changed

+7
-120
lines changed

adafruit_pyportal/network.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"""
2525

2626
import gc
27+
import neopixel
28+
from adafruit_portalbase.wifi_coprocessor import WiFi
2729

2830
# pylint: disable=unused-import
2931
from adafruit_portalbase.network import (
@@ -33,7 +35,6 @@
3335
)
3436

3537
# pylint: enable=unused-import
36-
from adafruit_pyportal.wifi import WiFi
3738

3839
__version__ = "0.0.0-auto.0"
3940
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyPortal.git"
@@ -87,7 +88,11 @@ def __init__(
8788
image_dim_json_path=None,
8889
secrets_data=None,
8990
):
90-
wifi = WiFi(status_neopixel=status_neopixel, esp=esp, external_spi=external_spi)
91+
if status_neopixel:
92+
status_led = neopixel.NeoPixel(status_neopixel, 1, brightness=0.2)
93+
else:
94+
status_led = None
95+
wifi = WiFi(status_led=status_led, esp=esp, external_spi=external_spi)
9196

9297
super().__init__(
9398
wifi,

adafruit_pyportal/wifi.py

Lines changed: 0 additions & 115 deletions
This file was deleted.

docs/api.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@
1515

1616
.. automodule:: adafruit_pyportal.peripherals
1717
:members:
18-
19-
.. automodule:: adafruit_pyportal.wifi
20-
:members:

0 commit comments

Comments
 (0)