File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 3
3
#
4
4
# SPDX-License-Identifier: Unlicense
5
5
6
- """Print out time based on NTP. """
6
+ """Print out time based on NTP, using connection manager """
7
7
8
8
import time
9
9
import adafruit_connection_manager
12
12
try :
13
13
import wifi
14
14
import os
15
+
15
16
# adjust method to get credentials as necessary...
16
17
wifi_ssid = os .getenv ("CIRCUITPY_WIFI_SSID" )
17
18
wifi_password = os .getenv ("CIRCUITPY_WIFI_PASSWORD" )
21
22
except ImportError :
22
23
import board
23
24
from digitalio import DigitalInOut
25
+
24
26
spi = board .SPI ()
25
27
try :
26
28
from adafruit_wiznet5k .adafruit_wiznet5k import WIZNET5K
29
+
27
30
# adjust pin for the specific board...
28
31
eth_cs = DigitalInOut (board .D10 )
29
32
radio = WIZNET5K (spi , eth_cs )
30
33
except ImportError :
31
34
from adafruit_esp32spi .adafruit_esp32spi import ESP_SPIcontrol
35
+
32
36
# adjust pins for the specific board...
33
37
esp32_cs = DigitalInOut (board .ESP_CS )
34
38
esp32_ready = DigitalInOut (board .ESP_BUSY )
You can’t perform that action at this time.
0 commit comments