1.12.23
- owenmichael12333
- Jan 12, 2023
- 1 min read
This week I have started working on the networking aspect of my project. To my knowledge I am wrapped up with the hardware portion. I have created if statements and converted all of the files I believe I need.
if code==800:
IMAGE_FILE="sunny_28.bmp"
#cloudy
if code>=801 and code<=804:
IMAGE_FILE="cloudy_28.bmp"
#light-rain
if code>=300 and code<=302:
IMAGE_FILE="lightrain_29.bmp"
#rain
if code>=500 and code<=522 or code==900:
IMAGE_FILE="rain_29.bmp"
#thunderstorm
if code>=200 and code<=233:
IMAGE_FILE="thunderstorm_29.bmp"
#snow
if code>=600 and code<=623:
IMAGE_FILE="snow_29.bmp"
#haze
if code>=700 and code<=751:
IMAGE_FILE:"haze_29"
Because the JSON file of the weather API returns codes that are associated with the weather, I needed to make the values of the variables reflect that. Currently I am attempting to connect the Raspberry Pi Pico to our wi-fi but am having difficulty. When creating a file that is supposed to connect it to the internet I receive an ImportError which I am currently attempting to fix.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'network'
コメント