How to use Gemini to rebuild microscope software
Gemini Pro 3 generated illumination and camera drivers before rewriting a Python Qt microscope stack; the developer guided the work and tested the replacement.
Prompt to try
Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.
Using [ESP32 pin configuration] and [camera SDK documentation], build illumination and camera drivers for [microscope]. Run builds and fix errors. Expose [required Python interfaces], then replace [existing Python Qt stack] with [required scanning and measurement features]. Ask for guidance where hardware behavior is unclear.
Reach people exploring AI agents
See placements →What happened
The author reported saving two to three days on each driver and weeks on the microscope rewrite, while finding some nonideal implementation choices.
Reported by dekhn on Hacker NewsHow the agent did it
- Generated an ESP-IDF illumination-control project and built it.
- Created a Python shared library for the control object.
- Supplied camera SDK documentation and generated a C++ Qt interface.
Where a person stepped in
The developer updated prompts, guided shared-library implementation, tested the microscope rewrite and inspected generated code.
A person approved each step before the agent continued.
dekhn used Gemini Pro 3 to replace the software for a self-built microscope. The work began with an ESP32 console application controlling the pins used by an LED illuminator. Gemini wrote the ESP-IDF project, ran build commands and fixed errors. The developer supplied updated prompts several times and also obtained a Python shared library for importing the control object.
Next, Gemini built a C++ Qt camera interface using the camera SDK's PDF documentation, which mixed English and Chinese. It handled concurrency and message passing, ran builds and corrected errors. The developer guided shared-library work and used the project to make a camera-settings GUI.
Finally, the developer asked Gemini to rewrite the Python and Qt microscope stack around those drivers. Features included image compositing during scanning, video recording, measurement tools and computer vision support. This phase needed substantially more human testing and prompt updates to reach the intended replacement.
Code inspection found both good implementation and nonideal choices, including polling where callbacks could have been used. The author reported saving days on each driver and weeks on the larger stack, freeing hobby time for tracking tardigrades. Who it's for: experienced hardware-software hobbyists who can supply device documentation and test generated code against their equipment.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Hacker News · dekhn
Frequently asked questions
What documentation supported the camera interface?
The developer supplied the camera SDK PDF, written in mixed English and Chinese, and requested an entire C++ Qt project.
How much human guidance was required?
The ESP32 project needed several prompt updates, the camera project needed shared-library guidance, and the full microscope rewrite required considerably more testing and updated prompts.
More details
Remaining steps
- Rewrote the Python Qt microscope stack using the two drivers.
- Tested the replacement and updated prompts to guide corrections.
About this account
Gemini wrote complete projects, ran build commands and fixed build errors, with the developer supplying guidance at several stages.
Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=47076195. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: dekhn on Hacker News
Source published 19 Feb 2026
Source checked 14 Oct 2026
Tools and topics
Gemini Pro 3 · ESP-IDF · Python · Qt · Camera SDK
Microscope · ESP32 · Qt
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.