I tried that, but it didn't work very well. It struggles to connect. By the time it completes the connection, the moment of interest has long past. Here is the output from the terminal:
Code: Select all
code.py output:
ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.2.2\x00')
MAC addr: ['0x20', '0xbf', '0x1e', '0x51', '0x91', '0x40']
NETGEAR90 RSSI: -54
Jim Wifi RSSI: -88
WRCHPD RSSI: -88
Gators RSSI: -90
Kiwi RSSI: -92
CaptionCall2_298115 RSSI: -94
Connecting to AP...
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
could not connect to AP, retrying: ('No such ssid', b'NETGEAR90')
could not connect to AP, retrying: ('Failed to connect to ssid', b'NETGEAR90')
Connected to NETGEAR90 RSSI: -52
My IP address is 192.168.1.22
IP lookup adafruit.com: 104.20.38.240
Ping google.com: 240 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Fetching json from http://api.coindesk.com/v1/bpi/currentprice/USD.json
----------------------------------------
{'time': {'updated': 'Jan 27, 2023 11:46:00 UTC', 'updatedISO': '2023-01-27T11:46:00+00:00', 'updateduk': 'Jan 27, 2023 at 11:46 GMT'}, 'disclaimer': 'This data was produced from the CoinDesk BANNED Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org', 'bpi': {'USD': {'code': 'USD', 'description': 'United States Dollar', 'rate_float': 22971.9, 'rate': '22,971.8639'}}}
----------------------------------------
Done!