Using an ESP32 or ESP8266 we can forecast weather by reading air pressure from a sensor such as the BOSCH BMP085/180 or BME280. Then by monitoring the changes in air pressure and categorising the changes thus: Rising quickly, Rising, Rising slowly, Steady, Falling slowly, Falling, Falling quickly. And applying the changes to a set of rules this enables the weather to be forecast based on air pressure at your location (adjusted from sea level with a offset) and then by monitoring changes over time, in this case 3 and 1 hours leading to a prediction with a good level of certainty.”

Link