File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
CircuitPython_Mastodon_API_Examples
NeoPixel_Sprite_Weather_Display
PicoW_CircuitPython_HTTP_Server
Scrolling_Alphanumeric_Countdown_Clock Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 14
14
hashtag = "CircuitPython"
15
15
16
16
# connect to SSID
17
- wifi .radio .connect (os .getenv ('WIFI_SSID ' ), os .getenv ('WIFI_PASSWORD ' ))
17
+ wifi .radio .connect (os .getenv ('CIRCUITPY_WIFI_SSID ' ), os .getenv ('CIRCUITPY_WIFI_PASSWORD ' ))
18
18
19
19
# add your mastodon token as 'mastodon_token' to your settings.toml file
20
20
headers = {'Authorization' : 'Bearer ' + os .getenv ('mastodon_token' ) + 'read:statuses' }
Original file line number Diff line number Diff line change 14
14
url = 'https://' + os .getenv ('mastodon_host' ) + '/api/v1/statuses'
15
15
16
16
# connect to SSID
17
- wifi .radio .connect (os .getenv ('WIFI_SSID ' ), os .getenv ('WIFI_PASSWORD ' ))
17
+ wifi .radio .connect (os .getenv ('CIRCUITPY_WIFI_SSID ' ), os .getenv ('CIRCUITPY_WIFI_PASSWORD ' ))
18
18
19
19
pool = socketpool .SocketPool (wifi .radio )
20
20
requests = adafruit_requests .Session (pool , ssl .create_default_context ())
Original file line number Diff line number Diff line change 43
43
weather_url += "¤t_weather=true&temperature_unit=%s&windspeed_unit=mph" % temperature_unit
44
44
45
45
# connect to SSID
46
- wifi .radio .connect (os .getenv ('WIFI_SSID ' ), os .getenv ('WIFI_PASSWORD ' ))
46
+ wifi .radio .connect (os .getenv ('CIRCUITPY_WIFI_SSID ' ), os .getenv ('CIRCUITPY_WIFI_PASSWORD ' ))
47
47
48
48
pool = socketpool .SocketPool (wifi .radio )
49
49
requests = adafruit_requests .Session (pool , ssl .create_default_context ())
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def c_to_f(temp):
75
75
gateway = ipaddress .IPv4Address ("192.168.1.1" )
76
76
wifi .radio .set_ipv4_address (ipv4 = ipv4 ,netmask = netmask ,gateway = gateway )
77
77
# connect to your SSID
78
- wifi .radio .connect (os .getenv ('WIFI_SSID ' ), os .getenv ('WIFI_PASSWORD ' ))
78
+ wifi .radio .connect (os .getenv ('CIRCUITPY_WIFI_SSID ' ), os .getenv ('CIRCUITPY_WIFI_PASSWORD ' ))
79
79
80
80
print ("Connected to WiFi" )
81
81
pool = socketpool .SocketPool (wifi .radio )
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def reset_on_error(delay, error):
55
55
56
56
57
57
try :
58
- wifi .radio .connect (os .getenv ("WIFI_SSID " ), os .getenv ("WIFI_PASSWORD " ))
58
+ wifi .radio .connect (os .getenv ("CIRCUITPY_WIFI_SSID " ), os .getenv ("CIRCUITPY_WIFI_PASSWORD " ))
59
59
# any errors, reset MCU
60
60
except Exception as e : # pylint: disable=broad-except
61
61
reset_on_error (10 , e )
You can’t perform that action at this time.
0 commit comments