LLM-generated code for physical hardware automation
A Japanese farmer uses large language models to generate the software stack for a GPS auto-steer system and greenhouse automation.

Heroki Tamayasu, a broccoli farmer in Hokkaido, built a software system to digitise his farm operations without prior coding experience. According to @kanekallaway on TikTok, he used ChatGPT and Codex to develop a GPS auto-steer system for his tractor and bots for greenhouse automation. He also integrates satellite imagery to monitor crop performance across different fields.
How it works
Tamayasu builds a custom software stack to replace manual farm management. The system moves data from physical sensors and remote imagery into a digital logic layer. This layer processes the inputs to trigger physical actions on the farm or update digital logs. He uses large language models to generate the underlying code for these components. The result is a closed-loop system where satellite data and GPS coordinates dictate tractor movement and greenhouse environments. The source does not specify the exact data formats or the specific protocols used for the sensor communication.
- Satellite Imagery InputThe system ingests remote data to monitor crop performance across different fields.
- GPS Auto-steer SystemThis component receives spatial coordinates to drive the tractor autonomously.
- Greenhouse BotsAutomated hardware units perform physical tasks within the greenhouse environment.
- Plant LogsSoftware tracks and records historical data for each crop.
- LLM Code GenerationChatGPT and Codex generate the functional code for the farm's software architecture.
What it takes to run
A production-ready automation system requires a reliable data pipeline to bridge the gap between field hardware and software logic. The GPS auto-steer system depends on precise coordinate data and a low-latency connection between the tractor's motor controllers and the navigation software. For greenhouse automation, the system needs a consistent stream of telemetry from environmental sensors. This data must be structured and cleaned before it reaches the logic layer to ensure the bots trigger actions correctly. Satellite imagery requires a recurring ingestion process to provide historical and current visual data for crop analysis. Maintaining this stack involves monitoring the integrity of sensor inputs and updating the code as hardware components fail or software requirements change.
- GPS hardware and motor controllers for tractor steering
- Environmental sensors for greenhouse monitoring
- Satellite imagery feeds for field analysis
- A reliable internet or local network connection for data transmission
- A maintenance plan for hardware calibration and software debugging
Where it breaks
Automating physical hardware with LLM-generated code introduces significant risks regarding deterministic execution. While an LLM can write a script to parse satellite imagery or format a log entry, it cannot guarantee the physical safety of a tractor moving in real-time. If the logic layer receives noisy sensor data or a malformed coordinate, the system might execute an incorrect command. The source does not state how Tamayasu handles edge cases where sensor inputs conflict or where the network connection drops during a critical operation. Without a dedicated safety layer or a fail-safe hardware override, a software bug becomes a physical hazard.
- Latency spikes in the telemetry stream can cause delayed responses in greenhouse environment controls.
- GPS drift or signal multipath errors can lead to inaccurate tractor positioning.
- LLM-generated code may lack the error handling required for long-running, autonomous background processes.
- Satellite imagery analysis is limited by cloud cover and the temporal resolution of the data provider.
How we would build it
We treat hardware automation as a safety-critical systems engineering problem rather than a script-generation task. To move from a prototype to a production environment, we separate the high-level intent from the low-level execution. This ensures that while an LLM might suggest a logic path, a deterministic controller manages the physical movement. We build a middleware layer that validates every command against a set of hard constraints before it reaches the motor controllers or irrigation valves.
- Sensor fusion and telemetry normalisationWe aggregate data from disparate hardware sources into a unified schema to ensure the logic layer receives consistent inputs.
- Deterministic command validationWe implement a rules engine that checks every automated action against pre-defined safety boundaries to prevent physical damage.
- Asynchronous message queuingWe use a message broker to handle telemetry data, ensuring the system remains responsive even if a specific sensor or network node goes offline.
- State machine architectureWe map every physical process to a formal state machine to track the current status of the farm and prevent conflicting commands from executing simultaneously.
LLM-generated code will move from experimental scripts to production hardware by next year. This shift requires standardising the middleware interfaces so that formal state machines can validate every output before execution.
Key takeaways
- LLM-generated code lacks the deterministic guarantees required for real-time physical safety.
- A middleware layer must validate every command against hard constraints before reaching motor controllers.
- Reliability depends on sensor fusion and a formal state machine to prevent conflicting commands.
Frequently asked
What specific protocols are used for the sensor communication?
The source does not specify the exact data formats or protocols used for the sensor communication.
How does the system handle a total loss of network connectivity during a tractor operation?
The source does not state how the system handles network drops during critical operations.
What is the specific temporal resolution of the satellite imagery used?
The source does not provide the specific temporal resolution of the data provider.