{"id":16651679,"url":"https://github.com/thijstriemstra/esp32-marlin-control","last_synced_at":"2026-05-17T15:02:20.851Z","repository":{"id":137999108,"uuid":"535085076","full_name":"thijstriemstra/esp32-marlin-control","owner":"thijstriemstra","description":"Send Gcode to Marlin from ESP32 using serial connection","archived":false,"fork":false,"pushed_at":"2023-03-11T17:14:50.000Z","size":13,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T15:36:01.521Z","etag":null,"topics":["esp32","gcode-sender","marlin","marlin-firmware","serial"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thijstriemstra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-10T18:30:47.000Z","updated_at":"2023-03-11T19:55:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"d174bd78-f90f-4c44-b4f5-348a9d9e061b","html_url":"https://github.com/thijstriemstra/esp32-marlin-control","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"98522912f44099fdf30e38ab68ca897d3c6314bf"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thijstriemstra/esp32-marlin-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstriemstra%2Fesp32-marlin-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstriemstra%2Fesp32-marlin-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstriemstra%2Fesp32-marlin-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstriemstra%2Fesp32-marlin-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thijstriemstra","download_url":"https://codeload.github.com/thijstriemstra/esp32-marlin-control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstriemstra%2Fesp32-marlin-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270671277,"owners_count":24625741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","gcode-sender","marlin","marlin-firmware","serial"],"created_at":"2024-10-12T09:26:14.435Z","updated_at":"2026-05-17T15:02:15.811Z","avatar_url":"https://github.com/thijstriemstra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 Marlin Control\n\nSend Gcode to Marlin from ESP32 using a serial connection.\n\n## Installation\n\nTested on RaspberryPi OS but runs on any platform supported\nby Python 3.6 or newer.\n\nCheckout source code:\n\n```console\ngit clone https://github.com/thijstriemstra/esp32-marlin-control.git\n```\n\nInstall `pyserial`:\n\n```console\npython3 -m pip install pyserial\n```\n\nInstall `esp32-marlin-control`:\n\n```console\ncd esp32-marlin-control\npython3 -m pip install -e .\n```\n\nYou should now be able to use the `esp32-marlin-control` commandline tool,\ne.g:\n\n```console\nesp32-marlin-control --help\n```\n\n## Usage\n\nStart the tool by supplying the ports used by the Marlin and ESP32 devices\nconnected to your machine.\n\nFor example, with Marlin connected to `/dev/ttyUSB0` and ESP32 connected\nto `/dev/ttyUSB1`:\n\n```console\nesp32-marlin-control -v --marlin-port=/dev/ttyUSB0 --esp32-port=/dev/ttyUSB1\n```\n\nOn the Windows operating system COM ports are used instead:\n\n```console\nesp32-marlin-control -v --marlin-port=COM3 --esp32-port=COM4\n```\n\n## Static port names\n\nIf the port names keep changing and you want to reference the device\nby a name that doesn't change (for example `/dev/marlin` instead of\n`/dev/ttyUSB0`), try the following.\n\nFirst, list the connected USB devices:\n\n```console\nlsusb\n```\n\nNext, create a udev rules file called `/etc/udev/rules.d/100-usb-serial.rules` with\nrules for the board running Marlin (`/dev/marlin`) and the ESP32 controller (`/dev/esp32`).\n\nMake sure to replace the `idVendor` and `idProduct` values for each device (that can be\nfound using `lsusb`). For example:\n\n```\nSUBSYSTEM==\"tty\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", SYMLINK+=\"marlin\"\nSUBSYSTEM==\"tty\", ATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"ea60\", SYMLINK+=\"esp32\"\n```\n\nRestart udev to load the new rule:\n\n```console\nsudo udevadm control --reload\nsudo udevadm trigger\n```\n\nThe devices can now be referenced using `/dev/marlin` and `/dev/esp32`:\n\n```console\nesp32-marlin-control -v --marlin-port=/dev/marlin --esp32-port=/dev/esp32\n```\n\n## Run as background service\n\nCreate a systemd unit file at `/etc/systemd/system/esp32-marlin-control.service`.\nMake sure to replace `--marlin-port` and `--esp32-port` with the correct ports,\nand set the correct path for the `esp32-marlin-control` application:\n\n```ini\n[Unit]\nDescription=ESP32 Marlin Control\nAfter=multi-user.target\n\n[Service]\nType=simple\nRestart=no\nExecStart=/path/to/esp32-marlin-control --marlin-port=\"/dev/marlin\" --esp32-port=\"/dev/esp32\"\n\n[Install]\nWantedBy=multi-user.target\n```\n\nEnable and start the service:\n\n```console\nsudo systemctl daemon-reload\nsudo systemctl enable esp32-marlin-control.service\nsudo systemctl start esp32-marlin-control.service\n```\n\nView log with:\n\n```console\njournalctl -f -n 50 -b -u esp32-marlin-control.service\n```\n\n# ESP32 example code\n\nOnce the `esp32-marlin-control` tool is running it will listen for serial messages from the\nESP32, and forward them to the board running Marlin.\n\nSimple example that demonstrates sending GCode from the ESP32 to Marlin:\n\n```c++\n#include \"Arduino.h\"\n\n#define SERIAL_BAUD_RATE 250000\n\nvoid setup() {\n  // start serial connection\n  Serial.begin(SERIAL_BAUD_RATE);\n\n  // M119 (show endstop status)\n  Serial.println(\"M119\");\n\n  // M84 (disable steppers)\n  Serial.println(\"M84 X Y Z\");\n\n  // make controller board beep\n  Serial.println(\"M300 S300 P100\");\n}\n\nvoid loop() {\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthijstriemstra%2Fesp32-marlin-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthijstriemstra%2Fesp32-marlin-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthijstriemstra%2Fesp32-marlin-control/lists"}