Inspiration
The spark for GeminiCraft came from a specific struggle during our university "Real-Time Embedded Systems" course.
We realized that learning IoT is expensive and risky. As students, we were constantly terrified of destroying our components—specifically the ESP32 microcontroller, which is fragile. One wrong wire, and you've fried a board. We tried existing online simulators, but they felt static; they simulated electricity but didn't help us learn or debug.
We asked ourselves: Why can't we have a simulator that doesn't just run code, but understands it? We wanted to build a bridge between hardware simulation and the Gemini 3 AI, creating a safe sandbox where students can experiment without fear.
What it does
GeminiCraft is an intelligent, web-based IoT workbench. It allows users to drag, drop, and wire virtual components (like ESP32s, sensors, and motors) just like they would on a physical breadboard.
Key features include:
- Virtual Workbench: A drag-and-drop interface for building circuits without the risk of burning components.
- AI Tutor: Integrated with Gemini 3, the system analyzes your circuit wiring and code in real-time, offering suggestions and explaining why a circuit works (or doesn't).
- Safe Simulation: Users can test their ESP32 logic and sensor connections in a browser environment before touching real hardware.
How we built it
We built the entire system using Visual Studio Code as our primary development environment.
- Frontend: The core interface was built using React (.jsx) and standard JavaScript. We designed a custom canvas to handle the "physical" interactions of components.
- Simulation Engine: We wrote a custom logic engine in JavaScript to handle the state changes of the IoT components.
- AI Integration: We utilized the Gemini 3 API to serve as the intelligence layer. We created specialized prompts that allow Gemini to "see" the JSON representation of the circuit board and the user's code simultaneously.
Challenges we ran into
The most significant challenge was the Simulation Synchronization Engine.
Initially, our simulation failed to propagate signals correctly between the ESP32 and external components. We realized that simply passing variables wasn't enough; we had to simulate the discrete time steps of a real microcontroller. We had to implement a mathematical model to determine if a signal was a logical HIGH or LOW based on voltage thresholds.
For the digital GPIO pins, we had to strictly define the logic state ( S_{pin} ) such that:
$$ S_{pin} = \begin{cases} 1 & \text{if } V_{in} \geq 0.7 \times V_{CC} \ 0 & \text{if } V_{in} \leq 0.3 \times V_{CC} \end{cases} $$
Furthermore, calculating values for analog sensors required implementing the voltage divider formula dynamically within our JavaScript loop to ensure accurate readings for the ADC (Analog-to-Digital Converter):
$$ V_{out} = V_{in} \cdot \frac{R_2}{R_1 + R_2} $$
Fixing these synchronization issues—ensuring that ( V_{out} ) updated in the exact same render cycle that the wire was connected—was a massive headache, but solving it meant our simulation finally felt "real."
Accomplishments that we're proud of
- Functional Physics Engine: We successfully built a simulation engine that correctly models the flow of logic between virtual components.
- Seamless AI Integration: We are proud of how Gemini 3 feels like a natural part of the UI, rather than just a chatbot attached to the side. It actually "understands" the circuit topology.
- Zero-Cost Learning: We created a tool that removes the financial barrier to entry for students learning embedded systems.
What we learned
- Hardware Abstraction: We learned an immense amount about how to abstract physical hardware into software objects. We had to understand not just how an ESP32 works, but how to mathematically represent its inputs and outputs in a web browser.
- Context Engineering: We learned that integrating Gemini 3 isn't just about sending API requests; it's about context. We discovered how to feed the model the right data (circuit topology + code) to get high-quality, actionable advice.
What's next for GeminiCraft
We plan to expand the component library to include more complex modules like OLED displays and servo motors. We also want to introduce "Collaborative Mode," allowing two students to work on the same virtual breadboard simultaneously, powered by Gemini 3's real-time reasoning.
Built With
- gemini
- google-gemini-api
- iot
- javascript
- react
- visual-studio-code
Log in or sign up for Devpost to join the conversation.