Last active
April 19, 2024 14:03
-
-
Save anecdata/bccd0cf19518b2cce85170c95ddbfae9 to your computer and use it in GitHub Desktop.
WIZnet WIZ850io W5500 "BFF" (SSL Requests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import board | |
import digitalio | |
import ssl | |
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K | |
import adafruit_connection_manager | |
import adafruit_requests | |
time.sleep(3) # wait for serial | |
spi = board.SPI() | |
cs = digitalio.DigitalInOut(board.A0) | |
rst = digitalio.DigitalInOut(board.A1) | |
radio = WIZNET5K(spi, cs, reset=rst) | |
pool = adafruit_connection_manager.get_radio_socketpool(radio) | |
ssl_context = ssl.create_default_context() | |
requests = adafruit_requests.Session(pool, ssl_context) | |
URL = "http://httpbin.org/get" | |
with requests.get(URL) as response: | |
print(response.status_code, response.reason, response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adafruit ESP32-S3 Qt Py + WIZnet WIZ850io W5500 module
https://fosstodon.org/@anecdata/112103369297669924