Hi all,
I using the following code to control the On board LED by the Bluetooth ,when using USB cable to power the code below is work .but when i unplug the USB and using battery to power up is nothing happen .
//Setup the BT Serial
function onInit() {
Serial1.setup(9600);
}
var trace = "";
Serial1.on('data', function (data) {
trace = +data;
digitalWrite(LED3,0);
if(trace == "1" ){
digitalWrite(LED2,1);
}
if(trace == "0" ){
digitalWrite(LED2,0);
}
});
save();
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 all,
I using the following code to control the On board LED by the Bluetooth ,when using USB cable to power the code below is work .but when i unplug the USB and using battery to power up is nothing happen .