# G Code Offline Controller ESP32

An offline controller capable of making any CNC machine intelligent, primarily using an ESP32 and an ILI9341 touch screen.

给 Grbl 数控机床做的手持触摸控制盒，目的是让干活的人不用再抱一台笔记本到机器前。

- id: adriankosey-g-code-offline-controller-esp32
- author: AdrianKosey
- repository: https://github.com/AdrianKosey/G-code_Offline_Controller_ESP32
- license: Apache-2.0
- shape: square
- scenes: tools
- boards: ESP32
- browser_playable: no
- preview: Project screenshots
- html: https://esp32gallery.com/projects/adriankosey-g-code-offline-controller-esp32/
- html_zh: https://esp32gallery.com/zh/projects/adriankosey-g-code-offline-controller-esp32/
- json: https://esp32gallery.com/data/catalog/projects/adriankosey-g-code-offline-controller-esp32.json

## Hardware

Supported hardware: ESP32. Confirm the exact board revision and pin map in the upstream repository.

支持硬件：ESP32。烧录前请在上游仓库核对板卡版本与引脚定义。

## English

```
A standalone touch pendant for a Grbl CNC machine, so nobody has to carry a laptop to the mill. A 30-pin ESP32 dev kit and a 240x320 ILI9341 touch display with an SD reader give you G-code preview with an auto-scaled toolpath, a jog screen with homing and work zero, and a file browser over both microSD and a USB stick through a CH376S. It streams G-code to Grbl over UART and tracks the full modal state with its own parser; it does not drive steppers itself. If the power drops mid-job, reboot brings up a safe homing cycle, restores that modal state and resumes at the interrupted line, provided the USB or SD stick stayed plugged in. A web dashboard mirrors status, jog and the console. Built with PlatformIO on Arduino, and the TFT_eSPI library has to be edited by hand before it compiles.
```

## 中文

```
给 Grbl 数控机床做的手持触摸控制盒，目的是让干活的人不用再抱一台笔记本到机器前。30 针 ESP32 开发板配一块带读卡器的 240x320 ILI9341 触摸屏，能预览自动缩放的刀路、用点动页做回零和设工件零点，还能在 microSD 和经 CH376S 读的 U 盘之间浏览文件。它通过串口把 G 代码流式发给 Grbl，并用自己写的解析器跟踪模态状态，本身不驱动步进电机。加工中掉电，重启后会先安全回零、恢复模态状态，再从断掉的那一行接着执行，前提是 U 盘或 SD 卡一直插着。同一份状态还能在浏览器里的远程面板上看，包括点动和实时控制台。用 PlatformIO 按 Arduino 框架构建，编译前必须手动改 TFT_eSPI 库的两个配置文件。
```
