You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
GdSerial - Serial Communication for Godot
A Rust-based serial communication library for Godot 4 that provides PySerial-like functionality.
Installation
- Download this addon from the Godot Asset Library or GitHub
- Copy the
addons/gdserialfolder to your project'saddons/directory - Enable the plugin in Project Settings > Plugins
Quick Start
extends Node
var serial: GdSerial
func _ready():
serial = GdSerial.new()
# List available ports
var ports = serial.list_ports()
print("Available ports: ", ports)
# Configure and connect
serial.set_port("COM3") # Adjust for your system
serial.set_baud_rate(9600)
if serial.open():
serial.writeline("Hello Arduino!")
var response = serial.readline()
print("Response: ", response)
serial.close()
API Reference
See the main repository README for complete API documentation.
Requirements
- Godot 4.2+
- Appropriate permissions for serial port access (see platform-specific notes in main README)
License
MIT License - see LICENSE file for details.