Skip to content
Ethos Lua Docs
LuaSPortSerial:write
Initializing search
FrSkyRC/ethos-lua-doc
Ethos Lua Docs
FrSkyRC/ethos-lua-doc
Home
Getting started
Getting started
Your first widget
Script types & lifecycle
Lua concepts
The Lua environment
Files, folders & packaging
Guides
Guides
Drawing on screen
Forms & configuration UI
Sources & telemetry
Events, keys & touch
Saving settings
Audio & haptics
Translations
Best practice
Best practice
Saving RAM
Saving CPU
Code patterns
Measuring
Pitfalls
Cookbook
Cookbook
Telemetry value widget
Battery gauge widget
Background alert task
System tool with a form
Lua source
Timer control
Memory monitor
Official examples
Official examples
Active look
Bluetooth
Custom sensor
Layout
Lazy loading
Memstatus
Source
Task
Theme
Tool form
Tool servo
Widget flvss
Widget form
Widget gauge
Widget jet
Widget lcddemo
Widget rssi
Widget sinus
Wizard
Xxxxl
API reference
API reference
Constants
Namespaces
Namespaces
bluetooth
bluetooth
listServices
listCharacteristics
write
crsf
crsf
getSensor
form
form
clear
height
invalidate
create
addExpansionPanel
addLine
addStaticText
addBooleanField
addNumberField
addChoiceField
addSliderField
addSourceField
addSwitchField
addSensorField
addColorField
addTimeField
addTextField
addTextButton
addButton
addFileField
addBitmapField
addStick
addPot
addTrim
addSwitch
addFunctionSwitch
addRotaryEncoder
addRadioHardware
getFieldSlots
openDialog
openWaitDialog
glasses
glasses
getWindowSize
createLayout
text
bitmap
lcd
lcd
RGB
GREY
color
themeColor
darkMode
focusStyle
font
pen
drawPoint
drawLine
drawTriangle
drawFilledTriangle
drawRectangle
drawFilledRectangle
drawCircle
drawFilledCircle
drawAnnulusSector
drawText
drawNumber
hasFocus
resetFocusTimeout
loadBitmap
loadMask
renderQrCode
loadFont
getFont
drawBitmap
drawMask
getTextSize
getContrastingColor
getWindowSize
setClipping
invalidate
isVisible
isSwiping
isConfiguring
setWindowTitle
model
model
dirty
name
path
bitmap
id
createTimer
getTimer
createLogicSwitch
getLogicSwitch
createSensor
createCurve
getCurve
createMix
resetFlight
getModule
getChannel
multimodule
multimodule
getSensor
serial
serial
open
simulator
simulator
touch
setReadOnly
resetInactivityTimer
resetBacklightTimer
loadModel
pressKey
pressFunctionSwitch
setSwitch
resetSwitches
setAnalog
resetAnalogs
connectUsb
advertizeBluetooth
injectSPortFrame
setDateTime
screenshot
sleep
turnRotaryEncoder
enterText
reloadScripts
setDebug
sport
sport
getSensor
storage
storage
read
write
system
system
getLocale
getAudioVoice
getVersion
getMemoryUsage
getInstructionsUsage
getStickMode
getSources
getSource
playFile
playNumber
playTone
playHaptic
killEvents
listFiles
registerLayout
registerTheme
registerWidget
registerSystemTool
registerMultimoduleProtocol
isSensorDiscoverActive
registerGhostModule
registerElrsModule
registerMlrsModule
registerCrossfireModule
registerGlasses
registerSource
registerSensor
registerTask
exit
emergency
startLatencyTest
getLatencyTestResult
resetBacklightTimeout
voltageRange
compile
openPage
Objects
Objects
Bitmap
Bitmap
width
height
rotate
Channel
Channel
name
direction
min
max
center
pwmCenter
slowUp
slowDown
ChoiceLib
ChoiceLib
help
title
values
CrsfSensor
CrsfSensor
pushFrame
popFrame
Curve
Curve
name
type
exponent
weight
offset
functionType
pointsCount
easyMode
smooth
point
ExpansionPanel
ExpansionPanel
open
clear
addLine
event
rect
FormFieldLib
FormFieldLib
enable
focus
rect
FrSkyStaticTextLib
FrSkyStaticTextLib
color
value
GlassesLayout
GlassesLayout
clearAndDisplay
clearAndDisplayExtended
LogicSwitch
LogicSwitch
name
negative
delayOff
delayOn
maxDuration
minDuration
state
func
activeCondition
values
LuaSPortFrame
LuaSPortFrame
band
rx
physId
primId
appId
value
LuaSPortSensor
LuaSPortSensor
band
rx
physId
appId
writeParameter
idle
requestParameter
getParameter
pushFrame
discover
popFrame
LuaSPortSerial
LuaSPortSerial
empty
size
read
write
write
Table of contents
Parameters
Returns
flush
Module
Module
type
protocol
enable
option
options
muteSensorLost
MultimoduleSensor
MultimoduleSensor
pushFrame
popFrame
NumberEditLib
NumberEditLib
onFocus
defaultStep
step
decimals
enableInstantChange
prefix
suffix
default
minimum
maximum
help
text
SliderLib
SliderLib
onFocus
step
minimum
maximum
help
Source
Source
name
rawValue
maximum
minimum
value
state
reset
age
unit
protocolUnit
stringUnit
decimals
protocolDecimals
stringValue
member
category
options
band
appId
physId
crsfId
subId
drop
TimeEditLib
TimeEditLib
title
Timer
Timer
name
direction
persistent
value
stringValue
alarm
start
startCondition
stopCondition
countingSource
voice
audioActions
resetCondition
reset
running
Tools & testing
Tools & testing
Web simulator
FrSky Suite
VS Code project template
VS Code deployments
AI agents & ethos-tools
Debugging
Contributing
Contributing
Updating the API docs
Writing examples
Real-world usage
Table of contents
Parameters
Returns
LuaSPortSerial:write
¶
since 1.1.0
Write a buffer.
serial
:
write
()
Parameters
¶
None.
Returns
¶
Nothing.
Back to top