diff --git a/micropython/examples/plasma_stick/weather.py b/micropython/examples/plasma_stick/weather.py index abd291d8..bb0374d1 100644 --- a/micropython/examples/plasma_stick/weather.py +++ b/micropython/examples/plasma_stick/weather.py @@ -88,7 +88,6 @@ def get_data(): # open the json data j = r.json() print("Data obtained!") - r.close() # parse relevant data from JSON current = j["current_weather"] @@ -101,6 +100,8 @@ Conditions = {WEATHERCODES[weathercode]} Last Open-Meteo update: {datetime_arr[0]}, {datetime_arr[1]} """) + r.close() + # flash the onboard LED after getting data pico_led.value(True) time.sleep(0.2)