GDSerCommPlugin
GDSerCommPlugin is a Godot 4.1+ plugin designed to enable communication between Godot projects and Arduino boards via serial communication. It provides functionalities to read and write serial input, facilitating integration with hardware projects.
https://github.com/NangiDev/GDSerCommPluginPreview Image

GDSerCommPlugin: Serial Communication for Godot Engine
GDSerCommPlugin is a Godot Engine plugin that allows developers to easily read and write serial data between their Godot projects and Arduino or other serial devices. This plugin is particularly useful for projects that require hardware interaction, such as robotics, IoT applications, or custom controller interfaces.
Key Features
- Serial Communication: Enables Godot applications to send and receive data via serial ports.
- Arduino Integration: Simplifies communication with Arduino boards for interactive projects.
- Easy Setup: Provides a straightforward way to configure baud rate and port number within the Godot editor.
-
Asynchronous Message Handling: Uses the
on_message(message : String)
function to handle incoming serial messages. -
Automatic Read: Automatically reads serial data in the
_process
function, which can be overridden for custom behavior.
Dependencies and Building
The plugin requires Godot 4.1 or later, godot-cpp, libserialport, and other build tools such as SCons and Python. The build process involves setting up a Python virtual environment, installing dependencies, and using SCons to compile the plugin. Both full and quick build options are available depending on whether a complete rebuild is needed.
Usage
To use the plugin, create a SerComm
node in your Godot scene and configure the baud rate and port number. You can then write scripts to send and receive data using the provided functions. The plugin automatically reads serial input in the _process
function, emitting the on_message
signal when a message is received.