RS232/Serial Port to Led blinking

im new to scripting guys, anyone has idea how to send power to lit up the led?
using serial port pins to led, then when running the script it will blink or flash maybe?

thanks for the help guys..

im using rb1100 and x86 both v6.19