The only thing I am confused about is how to send the return output of a function back to my webpage?! For example if I call digitalRead(D5); The function logs either a 0 or 1 to the console. Instead I want to send the response using
ws.send(response);
I tried setting the console to a variable and then sending the variable over ws, but the msg is always empty.
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.
The only thing I am confused about is how to send the return output of a function back to my webpage?! For example if I call digitalRead(D5); The function logs either a 0 or 1 to the console. Instead I want to send the response using
I tried setting the console to a variable and then sending the variable over ws, but the msg is always empty.