 boolean comAvailable(){
   boolean value;
   if(isBT){
-    value=BT.available(); 
+    value=BT.available();
   }
   else{
     value=Serial.available();

#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303.h>
#include <Wire.h>
#include <SoftwareSerial.h>
SoftwareSerial BT(10,11);
//RX/TX
Adafruit_LSM303 lsm;
boolean isBT=false;
String idString="00";
int tonePin=2;

int buttonPin=3;
boolean isON=false;
int buttonState;
int lastButtonState=HIGH;
unsigned long lastDebounceTime=0;
unsigned long debounceDelay=50;

void setup() {
  // put your setup code here, to run once:


void mySend(String s){
  //add device ID
  s=idString+" "+s;
  if(isBT){
    BT.println(s);
  }
