connectionToPort = createConnection(COM3, 9600)
connectionToPort.setHandler(callbackFunction)
callbackFunction(data){
if(data==SIGNAL_START){
doSomethingOnStart()
}else if(data == SIGNAL_ANOTHER){
doSomethingOnAnother()
}else{
doSomethingOnUnKnown()
}
}