Answer the question
In order to leave comments, you need to log in
How to run your functions when receiving a signal from a comport in python?
Pseudocode:
connectionToPort = createConnection(COM3, 9600)
connectionToPort.setHandler(callbackFunction)
callbackFunction(data){
if(data==SIGNAL_START){
doSomethingOnStart()
}else if(data == SIGNAL_ANOTHER){
doSomethingOnAnother()
}else{
doSomethingOnUnKnown()
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question