Inspiration
A farmer is the backbone of our food supply, so the worst moment for a storm is harvest week. One night of heavy rain, hail or extreme heat can ruin a whole season of hard work: rain on ripe wheat makes the grain sprout, and soybean pods shatter. Weather apps say "rain on Thursday", but not "what to do" about it for each crop. I wanted to build that step between the forecast and the decision.
What it does
HarvestGuard tracks how ripe each crop is and checks the 7-day forecast against "crop-specific limits" (ripe wheat tolerates far less rain than corn). Each crop gets a color: Green for "Harvest now", Yellow for "Harvest soon", Red for "Wait" or Blue for "Protect the crop", with a message explaining why and what to do.
Alerts go to the farmer's phone through a "Telegram bot", only when the advice changes. Urgent alerts also arrive as a "voice message made with ElevenLabs", because a farmer on a tractor can have a language barrier. A "barometer sensor on an Arduino" adds local data from the field: falling air pressure means a storm is coming, and it also detects extreme cold and heat.
How we built it
- "Backend": Python, FastAPI, SQLite (SQLModel) and APScheduler, checking every crop each minute
- "APIs": Open-Meteo (forecast), Telegram Bot API (alerts), ElevenLabs (voice)
- "Hardware": Arduino 101 + Grove Barometer, read over USB with pyserial
- "Frontend": dashboard in HTML, CSS and JavaScript
- "Decision engine": rule-based, so every recommendation can be explained, and tested with pytest
Challenges we ran into
- The Arduino IDE didn't recognize my board, until the USB ID showed it was an Intel Arduino 101.
- A hidden bug made storm alerts repeat every minute: saving them failed silently in a background thread. I fixed it and added a test for it.
- Making a barometer demo-able: real storm detection needs 3 hours of data, so for the demo I shortened the window and squeeze the sensor in a sealed bag.
Accomplishments that we're proud of
- It works with "real data": overnight the real forecast changed several times, and the app updated its advice and sent alerts on its own, including a voice alert.
- Hardware, voice alerts, a dashboard and tested logic, built solo at "my first hackathon".
What we learned
My first time using FastAPI, JavaScript, Arduino sensors, the Telegram Bot API and ElevenLabs, and that a hardware demo always needs a plan B.
What's next for HarvestGuard
- "Drone integration": a drone flying over the field to measure how ripe the crop really is and spot damage from above, for better data
- Real crops data for the crop limits, and more crops
- SMS alerts for farmers without smartphones
- Solar-powered field sensors that don't need a laptop
Log in or sign up for Devpost to join the conversation.