File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 2
2
# SPDX-FileCopyrightText: 2023 Limor Fried for Adafruit Industries
3
3
#
4
4
# SPDX-License-Identifier: Unlicense
5
-
6
5
import ssl
7
6
import os
8
7
import time
18
17
19
18
import adafruit_pycamera
20
19
21
- UTC_OFFSET = os .getenv ('UTC_OFFSET' )
22
- TZ = os .getenv ('TZ' )
23
-
24
20
# Wifi details are in settings.toml file, also,
25
- # timezone info should be included to allow local time and DST adjustments
21
+ # timezone info should be included in settings.toml to allow local time and DST adjustments
26
22
# # UTC_OFFSET, if present, will override TZ and DST and no API query will be done
27
23
# UTC_OFFSET=-25200
28
24
# # TZ="America/Phoenix"
29
25
26
+ UTC_OFFSET = os .getenv ("UTC_OFFSET" )
27
+ TZ = os .getenv ("TZ" )
28
+
30
29
try :
31
- print ("Connecting to %s" % os .getenv ("CIRCUITPY_WIFI_SSID" ))
32
- wifi .radio .connect (os .getenv ("CIRCUITPY_WIFI_SSID" ), os .getenv ("CIRCUITPY_WIFI_PASSWORD" ))
33
- print ("Connected to %s!" % os .getenv ("CIRCUITPY_WIFI_SSID" ))
30
+ print (f"Connecting to { os .getenv ('CIRCUITPY_WIFI_SSID' )} " )
31
+ wifi .radio .connect (
32
+ os .getenv ("CIRCUITPY_WIFI_SSID" ), os .getenv ("CIRCUITPY_WIFI_PASSWORD" )
33
+ )
34
+ print (f"Connected to { os .getenv ('CIRCUITPY_WIFI_SSID' )} !" )
34
35
print ("My IP address is" , wifi .radio .ipv4_address )
35
36
pool = socketpool .SocketPool (wifi .radio )
36
37
You can’t perform that action at this time.
0 commit comments