From Deadlocks to Green Streaks: Building an AI Greenhouse with Gemini in 36 Hours
Source: Dev.to
Overview
As university students, my teammates and I noticed a common problem: many people want to grow their own fruits and vegetables but simply don’t have the time to monitor a garden. We wanted to bridge that gap.
We set out to create a system that could teach anyone how to automatically grow their own produce using a simple, accessible Raspberry Pi kit.
Built over 36 hours at the MLH‑sponsored uOttaHack 8 (with almost a thousand registered students), Plante (French for “plant”) is a prize‑winning mini‑automated greenhouse and gamified learning platform.
- Temperature, humidity, and soil sensors are connected to a Raspberry Pi and an Arduino.
- The greenhouse automatically opens and closes its hatch using servos to regulate the environment.
- A camera monitors plant health.
To make learning fun, we built a sleek, gamified frontend (which actually won the “Best Design” prize!). Users earn XP, maintain “green streaks”, and unlock achievements in a personal museum for keeping their plants alive. Users can also visit friends’ farms and museums, enhancing the social aspect of growing plants.
AI Integration (Software Lead)
My main focus was integrating AI to make Plante truly intelligent. I used the Google Gemini API to power two core features:
1. Context‑Aware AI Chat
We didn’t want a generic botany bot. Real‑time sensor data from a user’s specific farm is passed directly into the prompt context.
Example: “Help, my Tomato Farm is critical 😭😭😭” → Gemini knows the exact humidity and temperature levels and provides targeted, actionable advice.
2. Weekly Pulse Insights
Gemini analyzes a plant’s data over the week to generate custom reports and suggestions, helping users develop long‑term farming habits.
Demo
- You can check out our full hardware and software demo in action here.
- Feel free to register in the Plante app directly, but note that AI features have been disabled after the hackathon ended.
- Here’s a demo CodePen of the little farm game (written from scratch in TypeScript). Press G to express yourself!
What I Learned
Technical Skills
- Hardware‑to‑Web Integration: Hooking up physical hardware to a web application is NO JOKE 🥶. We created a dedicated sensor‑polling service on the Raspberry Pi that our app’s server talks to, because requesting sensor data directly from the backend caused deadlocks.
- Architecture: More moving parts mean exponentially more thought about system architecture.
- Electronics: Wired servos and sensors to an Arduino, routed them through a Raspberry Pi, and exposed the hardware states via a REST API.
Takeaway: Even with almost no prior hardware knowledge, you can build a fully featured system. Multi‑modal AI models like Gemini make bridging knowledge gaps extremely accessible. If you’d like to learn how to build apps with Google AI Studio, follow the “Build Apps with Google AI Studio” track—it teaches you to get creative on your own.
MVP & Pivot
Our original plan included a fully automated water pump, but the hardware kit couldn’t draw enough power. With the clock ticking, we scrapped the physical pump and pivoted to a software solution: the “Water Now” trigger now sends a mobile push notification to the user.
Lesson: MVP scoping and rapid adaptation are crucial when hardware refuses to cooperate.
Future Directions
- Design a larger mechanical box for bigger plants.
- Add more advanced actuators and community leaderboards.
- Deploy a Raspberry Pi AI HAT+ 2 Kit for edge inference with LLM/LVM capabilities.
Gemini Experience
- Model: Gemini 2.5 Flash – fast and well‑balanced for a hackathon.
- Context Window: 1 million tokens let us pass temperature, humidity, light, farm, and user info directly into the prompt without truncation.
- Multimodal Help: When stuck, we photographed our hardware and sent the images (with text) to Gemini via the web interface. This was a huge help; our hardware lead later built Buildo (an app that turns hardware ideas into reality by generating images with Gemini and finding required components). His team won MLH’s Best Use of Gemini API, showcasing Gemini’s power for hardware projects.
Prompt Engineering: Without explicit system instructions, Gemini sometimes “over‑engineered” its advice, jumping to complex solutions instead of answering the specific plant question. Rigorous prompt engineering kept the AI within its helpful “Plante Assistant” persona and prevented hallucinations.
Rate Limits: The free‑tier limits for the Gemini API (which dropped recently to around 15 …)
Rate‑Limiting Issues (Flash API)
During our rapid, late‑night testing phases we were hit hard by requests‑per‑minute limits for Flash. We kept running into the dreaded 429 Too Many Requests error right when we were trying to debug the chat feature.
To keep the app from crashing during demo prep we had to pause UI work and implement exponential back‑off logic.
The experience was fair, though, because we received our API key with just a few clicks and could start using it right away 🫡.
🌱 Plante
🏆 Best Designed Award – uOttaHack 8 2026
A gamified, pixel‑art smart plant‑monitoring system with AI chat, Raspberry Pi sensor integration, and real‑time farm management.
- Devpost: [Link]
- Demo Video: [Link]
✨ Features
- 🎮 Pixel‑Art UI – Retro‑styled interface using the PICO‑8 colour palette and NES.css
- 🤖 AI Chat Assistant – Gemini‑powered chat with voice synthesis (ElevenLabs)
- 📊 Live Sensor Data – Real‑time temperature, humidity, and soil‑moisture from Raspberry Pi
- 📸 Pi Camera Feed – Auto‑capturing plant photos with pixel‑art filters
- 🔔 Smart Notifications – In‑app and SMS alerts via Twilio
- 📈 Weekly Pulse – AI‑generated weekly insights about your plants
- 🏆 Gamification – XP, levels, achievements, and leaderboards
- 🔐 Google Auth – Secure authentication with NextAuth.js
🚀 Quick Start
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys
# Start development server
npm run dev
# Open the app
open http://localhost:3000
View on GitHub: [Repository Link]