adafruit / Adafruit_CircuitPython_NTP

Network Time Protocol (NTP) Helper for CircuitPython
MIT License
9 stars 18 forks source link

Example using adafruit_connection_manager #31

Closed anecdata closed 7 months ago

anecdata commented 7 months ago

Example using adafruit_connection_manager to allow alternate radios (sources of sockets)

Addresses: https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/issues/132

Tested with CP9.0.0.* on: Adafruit QY Py ESP32-S3 Raspberry Pi Pico W MCU + Adafruit Ethernet FeatherWing

Tested on Adafruit PyPortal, but ESP32SPI currently has no context manager for sockets, and the NTP library requires this. (issue filed)

anecdata commented 7 months ago

While trying to do a context manager for ESP32SPI, found other incompatibilities: ESP32SPI sockets don't have sendto or recvfrom_into, so it looks like either NTP or ESP32SPI will need more extensive changes to make them work together.

I'll simplify this example for now to not include ESP32SPI.