f3f9d90cd005e44a9bd58ae10ac1abd8edca4335
The shared bridge shipped in both posts named Main.gd and
JoystickBridge.ino in its docstring and --baud help — so the part-1
(LED basics) download referenced files absent from its own project.
Neutralize the wording ("Godot", "the .ino sketch") so the same bridge
reads correctly in both downloads.
Godot + Arduino — blog project code
Companion code for the "Godot Isn't Just for Games" series on the Codebycandle blog — using the Godot 4 game engine as a hardware control panel for an Arduino Uno.
Each folder is a self-contained project for one article: the Arduino sketch, the Python serial↔UDP bridge, and the Godot project.
| Part | Article | Folder | What it does |
|---|---|---|---|
| 1 | Your First Arduino Round-Trip | godot-arduino-1-led-first-light/ |
A Godot button lights a real LED on D13, over a Python-to-UDP bridge. |
| 2 | A Live Joystick Dashboard (coming soon) | godot-arduino-2-joystick-dashboard/ |
A KY-023 joystick streams x,y,btn telemetry into a glowing Godot XY pad. |
The shape of it
Arduino <--USB serial--> bridge.py <--UDP 127.0.0.1--> Godot
Godot has no serial support, so a ~40-line Python bridge owns the COM port and relays each line over UDP on localhost, in both directions. See each part's README for wiring and run steps.
Requirements
- Arduino Uno (or compatible) + the Arduino IDE
- Python 3 with
pyserial(pip install pyserial) - Godot 4 (standard build — no GDExtension needed)
License
Released under the MIT License — use it freely.
Description
accompanying code files for the company blog: https://codebycandle.com/blog
45 KiB
Languages
Python
53.2%
GDScript
21.1%
C++
20.1%
Shell
3%
Batchfile
2.6%