# This code is not working for me. I tried below code...and tried many ways but not receiving on RX but TX works fine.
on Espruino v1.99 on NodeMCU
var status=0;
function swap() {
status = !status;
digitalWrite(NodeMCU.D0, status);
}
function onInit()
{
Serial1.setup(9600);
Serial1.on('data', function (data) { swap(); });
LoopbackA.setConsole();
}
//onInit();
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.
# This code is not working for me. I tried below code...and tried many ways but not receiving on RX but TX works fine.
on Espruino v1.99 on NodeMCU
var status=0;
function swap() {
status = !status;
digitalWrite(NodeMCU.D0, status);
}
function onInit()
{
Serial1.setup(9600);
Serial1.on('data', function (data) { swap(); });
LoopbackA.setConsole();
}
//onInit();