SkillAgentSearch skills...

LuaSerialPort

Lua serial port module (requires ffi)

Install / Use

/learn @cbrake/LuaSerialPort
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Lua Serial Port

Introduction

This project implements a Serial Port module for Lua. It currently only supports Linux, and requires LuaJIT FFI.

Example

local sp = require "serial-port"
sp.open("/dev/ttyUSB0");
sp.setBaud(sp.B115200);
local count = sp.write("123");
print("Wrote " .. count .. " bytes");

Motivation

While the same could be accomplished using various projects like luaposix or librs232lua, many times you simply need something simple and don't want to be bothered with building extensions that have native code -- especially cross compiling for embedded platforms.

Status

  • non-blocking read/write implemented

License:MIT

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated7mo ago
Forks2

Languages

Lua

Security Score

67/100

Audited on Aug 29, 2025

No findings