• 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();
    
About

Avatar for jacklee @jacklee started