Arduino Relay Bluetooth control

OK. Try this:

#include <SoftwareSerial.h>[color=#222222][/color]
SoftwareSerial BT(9, 10);[color=#222222][/color]
String inString = "";//An empty string[color=#222222][/color]
void setup() {[color=#222222][/color]
  Serial.begin(9600);//Open the serial monitor with  a baud rate of 9600.[color=#222222][/color]
  BT.begin(57600);//whatever baud rate worked for the other example I gave you[color=#222222][/color]
}[color=#222222][/color]
void loop() {[color=#222222][/color]
  if (BT.available() > 0) {[color=#222222][/color]
    inString = BT.readStringUntil('\n');[color=#222222][/color]
    if(inString == "11"){[color=#222222][/color]
       Serial.println("Button pressed!");[color=#222222][/color]
    }[color=#222222][/color]
    else if (inString == "10"){[color=#222222][/color]
     Serial.println("Button released!");[color=#222222][/color]
    }[color=#222222][/color]
    else{[color=#222222][/color]
    }[color=#222222][/color]
  }
  Serial.println(inString);[color=#222222][/color]
}

You should at least get something.

got this message trying to upload the code;

Arduino: 1.6.5 (Windows 7), Board: "Arduino Uno"

sketch_jul14a:2: error: stray '#' in program sketch_jul14a:4: error: stray '#' in program sketch_jul14a:7: error: stray '#' in program sketch_jul14a:8: error: stray '#' in program sketch_jul14a:9: error: stray '#' in program sketch_jul14a:10: error: stray '#' in program sketch_jul14a:11: error: stray '#' in program sketch_jul14a:12: error: stray '#' in program sketch_jul14a:13: error: stray '#' in program sketch_jul14a:14: error: stray '#' in program sketch_jul14a:15: error: stray '#' in program sketch_jul14a:16: error: stray '#' in program sketch_jul14a:17: error: stray '#' in program sketch_jul14a:18: error: stray '#' in program sketch_jul14a:20: error: stray '#' in program sketch_jul14a:4: error: 'color' does not name a type sketch_jul14a:2: error: expected unqualified-id before '[' token sketch_jul14a.ino: In lambda function: sketch_jul14a:4: error: expected '{' before '[' token sketch_jul14a.ino: In function 'void setup()': sketch_jul14a:4: error: expected primary-expression before '/' token sketch_jul14a:4: error: 'color' was not declared in this scope sketch_jul14a:5: error: expected ';' before 'Serial' sketch_jul14a.ino: At global scope: sketch_jul14a:7: error: expected unqualified-id before '[' token stray '#' in program

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

Sorry, the code tags in the forum don't always work right. Take out all the [color=#222222] in the program.

Alright looks Like I am getting a reading now, but all it is a constant amount of funny looking "a"

Did you open the serial monitor at the right speed? And also change the BT.begin() line. Make sure you have the Serial.begin(); faster than the bt.

What do you mean by right speed? When I got all of those readings from the first code I used my serial begin 9600 and a baud rate on the serial monitor was 57600. I used the same readings for this one and I was getting those weird a's that would not stop. Would I have to go through all of them again to find the right reading?

Well, if it worked before and not now, I suspect wrong baud rate in the Serial Monitor. I think you know how to change it. Actually, change the Serial.begin() line to 115200. You will also have to change the rate in the monitor.

Alright I'll start changing around baud rates and the myserialbegins see if I can get any sort of reading.

It seems like no matter what rate I use with ought touching any buttons on the app the serial monitor outputs a ton of random jiberish constantly.

Did you change the serial monitor baud rate?