I now have ideas on port scanning and how to display lamp, just don't know how to put them together
CodePudding user response:
Detect port receive particular string, to save the current system time and the string to the two global variableIn a thread or message loop (Windows), or clock interrupt service program related (single chip microcomputer system or pure DOS system), to check the two global variables, if the variable in time and the current system time difference is small. Such as 1 seconds and wasn't changed lamp state, and the current state and to change the lamp light condition is different, the modified light condition,
CodePudding user response:
Your port after receiving the data active the call control function of light to trigger