Skip to content

Commit

Permalink
Change appw to password in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
justmobilize committed Feb 23, 2024
1 parent 44cb163 commit 81657b1
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions examples/esp32spi/requests_esp32spi_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# If you are using a board with pre-defined ESP32 Pins:
esp32_cs = DigitalInOut(board.ESP_CS)
Expand All @@ -37,7 +37,7 @@
print("Connecting to AP...")
while not radio.is_connected:
try:
radio.connect_AP(ssid, appw)
radio.connect_AP(ssid, password)
except RuntimeError as e:
print("could not connect to AP, retrying: ", e)
continue
Expand Down
4 changes: 2 additions & 2 deletions examples/esp32spi/requests_esp32spi_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# If you are using a board with pre-defined ESP32 Pins:
esp32_cs = DigitalInOut(board.ESP_CS)
Expand All @@ -37,7 +37,7 @@
print("Connecting to AP...")
while not radio.is_connected:
try:
radio.connect_AP(ssid, appw)
radio.connect_AP(ssid, password)
except RuntimeError as e:
print("could not connect to AP, retrying: ", e)
continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")


# Converts seconds to minutes/hours/days
Expand Down Expand Up @@ -58,7 +58,7 @@ def time_calc(input_time):
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
Discord_Auth = os.getenv("Discord_Authorization")

# Initialize WiFi Pool (There can be only 1 pool & top of script)
Expand Down Expand Up @@ -62,7 +62,7 @@ def time_calc(input_time): # input_time in seconds
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_fitbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

Fitbit_ClientID = os.getenv("Fitbit_ClientID")
Fitbit_Token = os.getenv("Fitbit_Token")
Expand Down Expand Up @@ -79,7 +79,7 @@ def time_calc(input_time):
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
# Github developer token required.
github_username = os.getenv("Github_username")
github_token = os.getenv("Github_token")
Expand All @@ -49,7 +49,7 @@
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_mastodon.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")


# Converts seconds in minutes/hours/days
Expand Down Expand Up @@ -70,7 +70,7 @@ def time_calc(input_time):
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
osnu = os.getenv("OSN_Username")
osnp = os.getenv("OSN_Password")

Expand Down Expand Up @@ -92,7 +92,7 @@ def _format_datetime(datetime):
request = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
# No token required, only website login
osnu = os.getenv("OSN_Username")
osnp = os.getenv("OSN_Password")
Expand Down Expand Up @@ -107,7 +107,7 @@ def _format_datetime(datetime):
request = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# Requests URL - icao24 is their endpoint required for a transponder
# example https://opensky-network.org/api/states/all?icao24=a808c5
Expand Down Expand Up @@ -71,7 +71,7 @@ def _format_datetime(datetime):
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
# Requires Steam Developer API key
steam_usernumber = os.getenv("steam_id")
steam_apikey = os.getenv("steam_api_key")
Expand Down Expand Up @@ -64,7 +64,7 @@
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
twitch_client_id = os.getenv("Twitch_ClientID")
twitch_client_secret = os.getenv("Twitch_Client_Secret")
# For finding your Twitch User ID
Expand Down Expand Up @@ -59,7 +59,7 @@ def time_calc(input_time):
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.connected:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
tw_userid = os.getenv("TW_userid")
tw_bearer_token = os.getenv("TW_bearer_token")

Expand Down Expand Up @@ -60,7 +60,7 @@
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_api_youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
yt_username = os.getenv("YT_username")
yt_token = os.getenv("YT_token")

Expand Down Expand Up @@ -60,7 +60,7 @@
requests = adafruit_requests.Session(pool, ssl.create_default_context())
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("Connection Error:", e)
print("Retrying in 10 seconds")
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/expanded/requests_wifi_multiple_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# Connect to the Wi-Fi network
print("Connecting to %s" % ssid)
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)

# Set up the requests library
pool = socketpool.SocketPool(wifi.radio)
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/requests_wifi_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# Initialize WiFi Pool (There can be only 1 pool & top of script)
radio = wifi.radio
Expand All @@ -20,7 +20,7 @@
print("Connecting to AP...")
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("could not connect to AP, retrying: ", e)
print("Connected to", str(radio.ap_info.ssid, "utf-8"), "\tRSSI:", radio.ap_info.rssi)
Expand Down
4 changes: 2 additions & 2 deletions examples/wifi/requests_wifi_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Get WiFi details, ensure these are setup in settings.toml
ssid = os.getenv("CIRCUITPY_WIFI_SSID")
appw = os.getenv("CIRCUITPY_WIFI_PASSWORD")
password = os.getenv("CIRCUITPY_WIFI_PASSWORD")

# Initialize WiFi Pool (There can be only 1 pool & top of script)
radio = wifi.radio
Expand All @@ -20,7 +20,7 @@
print("Connecting to AP...")
while not wifi.radio.ipv4_address:
try:
wifi.radio.connect(ssid, appw)
wifi.radio.connect(ssid, password)
except ConnectionError as e:
print("could not connect to AP, retrying: ", e)
print("Connected to", str(radio.ap_info.ssid, "utf-8"), "\tRSSI:", radio.ap_info.rssi)
Expand Down

0 comments on commit 81657b1

Please sign in to comment.