Getting weather data on our Pi with OpenWeatherMap
We're going to build a weather bot for this one, and while we could use a temperature sensor, that'd only tell us what it's like indoors, and usually we'd like to see what the weather's like outside before we head out the door. So we're going to use the OpenWeatherMap API to get data and display it on a character LCD; but let's walk before we can run by starting with getting the data from the API to the Pi.
Getting an OpenWeatherMap API key
First, you'll need to sign up for an account at https://openweathermap.org/, and generate an API key. Then, click your username in the upper-left corner and select API Keys
from the tabs that appear near the top of the page:

Generate an API key on this page and keep the tab open; we'll use it in the next section to get the info we need.
Next, open the API link in a separate tab; you'll see the main API function calls on this page. The one we're looking for is right at the top – current weather data.

Â
Click...