I2C, BluefruitEZLink, Processing For Android

I’m building an Android Controlled Rover using Bluetooth (BluefruitEZLink)

I’m doing it using Processing for android but because my motorshield uses pins 10/11 for RX/TX I need to put the Blue tooth onto it’s own arduino and send commands using I2C.
Pololu Dual VNH5019 Motor Driver Shield for Arduino -motorshield Link
I could use a Mega but I’m running a lot of voltage and current through the motor shield and i want to protect the EZLink.

This example works and is the basis for my arduino/bluetooth communication:

just so you know “mySerial” is the serial monitor on the android which displays “LED is on” when I tap the screen but the slave arduino reader is only showing -1-1-1-1-1-1-1-1-1-1-1-1 until i hit the android screen then it switches to 8108108108 ad infinitum.

Master writer Code

#include <Wire.h>
#include <SoftwareSerial.h>

//led is in slave
char chByte = 0;  // incoming serial byte
String strInput = "";    // buffer for incoming packet
String strCompare = "switch";
SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  Wire.begin(); // join i2c bus (address optional for master)
  //initialize BT Serial

//int x = 0;

void loop() {
  Wire.beginTransmission(9); // transmit to device #8
          // sends five bytes 
           // sends one byte

   while (mySerial.available() > 0)
  // get incoming byte:
  chByte = mySerial.read();
  if (chByte == '\r')
   //compare input message
    //toggle LED
  //  Wire.write("led state  ");
    mySerial.println("LED is ON");
    //mySerial.println("LED is OFF");
   //reset strInput
   strInput = "";
  strInput += chByte;

  Wire.endTransmission();    // stop transmitting

Slave Reader:

//SlaveReaderOf Bluetooth Command to turn LED on
// Include the required Wire library for I2C
#include <Wire.h>
#include <SoftwareSerial.h>

int LED = 13;
int x = 0;

void setup() {
  // Define the LED pin as Output
  pinMode (LED, OUTPUT);
  // Start the I2C Bus as Slave on address 9
  // Attach a function to trigger when something is received.

void receiveEvent(int bytes) {
  x = Wire.read();    // read one character from the I2C

void loop() {
  //If value received is 0 blink LED for 200 ms
  if (x >0) {
    digitalWrite(LED, HIGH);

    else {
    digitalWrite(LED, LOW);

The I2C example I’m working off of is this which I haven’t actually gotten to work with the LED (pin13) but it does send the correct x values.

Anyways this shouldn’t be too hard but I’m messing something up