pimoroni-pico
pimoroni-pico copied to clipboard
Add Garbage Collection to weather example
trafficstars
The existing weather example was resulting in OSError: [Errno 12] ENOMEM when executing subsequent calls to the open-meteo API.
After adding the garbage collection I am no longer seeing these errors and data is being collected as per the timer.
Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******¤t_weather=true&timezone=auto
Data obtained!
Temperature = 17.8°C
Conditions = slight rain
Last Open-Meteo update: 2024-07-24, 19:45
Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******¤t_weather=true&timezone=auto
Data obtained!
Temperature = 17.6°C
Conditions = cloudy
Last Open-Meteo update: 2024-07-24, 20:00
Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******¤t_weather=true&timezone=auto
Data obtained!
Temperature = 17.4°C
Conditions = cloudy
Last Open-Meteo update: 2024-07-24, 20:15
Sorry, and thank you, all the RP2350 and SDK 2.0 stuff has been keeping me busy!