Hi,
Espruino is connected to second board over Serial1 and it sends some querys to get information from second board. After the query sent, javascript code must go idle state for receive response process. if the js code waits in a while loop for response after query, the Serial1.on("data.. event never processing. Is there any way to get response after query on single function ? I used a code similar to state machine for a solution.
Some object oriented languages uses like "doEvents", "processMessages" statements for execution event codes in busy state. Any suggestion for single function ?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
Espruino is connected to second board over Serial1 and it sends some querys to get information from second board. After the query sent, javascript code must go idle state for receive response process. if the js code waits in a while loop for response after query, the Serial1.on("data.. event never processing. Is there any way to get response after query on single function ? I used a code similar to state machine for a solution.
Some object oriented languages uses like "doEvents", "processMessages" statements for execution event codes in busy state. Any suggestion for single function ?
Thank you
1 Attachment