Code: Select all
response = None
while not response:
try:
eth = WIZNET5K(spi_bus,cs,dhcp_timeout=3)
requests.set_socket(socket, eth)
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
response = requests.get(TEXT_URL)
except AssertionError as error:
print("Checking")
print("Text Response: ", response.text)
response.close()
response = None
while True:
try:
JSON_URL = ("example.com")
r=requests.get(JSON_URL)
response = r.json()
default = response["word"]
defaultRead=default
print(r.json())
r.close()
except AssertionError as error:
Code: Select all
r=requests.get(JSON_URL)
The other question is, which mpconfig.h should I change?
https://github.com/adafruit/circuitpyth ... aspberrypi this or
this https://github.com/adafruit/circuitpyth ... ry_pi_pico
I am using raspberry pi pico. And are these defines enough ?
Code: Select all
#ifndef CIRCUITPY_PYSTACK_SIZE
-#define CIRCUITPY_PYSTACK_SIZE 1024
+#define CIRCUITPY_PYSTACK_SIZE 2048
#endif
#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt"