Using App Inventor To Control Motor Shield Through Bluetooth

I recently bought an Itead Bluetooth Shield v2.2. I connected it to my Arduino Uno and opened my App Inventor App. While I can connect to the BT shield(the status LED even lights up as if it was connected), I can’t send anything to the arduino (or it doesn’t recognize it). I tried writing a simple code to try to light up an LED (the built in LED on the board).

#include <SoftwareSerial.h>

SoftwareSerial mySerial(6,7);

int led = 13;
int val;

void setup() {                
  pinMode(led, OUTPUT);
  mySerial.begin(9600);
}

void loop() {
  if (mySerial.available()){
     val = mySerial.read();
  }
  
  if (val == '1'){
    digitalWrite(led, HIGH);
  }
  if (val == '2'){
    digitalWrite(led, LOW);
  }
}

As you can see (from the pictures below), I have the Rx pin connected to pin 6 and Tx to pin 7. Any help would be greatly appreciated and I’m sorry if I missed any info I should have given.

Try to print the val via your Serial:

  if (mySerial.available()){
     val = mySerial.read();
     Serial.println(val);
  }

Nothing. I even started using a bluetooth ssp app to rule out the app I built. I even tried printing from the BT module to the app.

Well it's working now. Not quite sure what I changed but it's working.

Hello, sory for reopen this topic…
But what did you do to it works as well? I’m trying to do a LED control, here is the code:

#include <SoftwareSerial.h>

#define LED_1       4
#define LED         3

SoftwareSerial bluetooth(6, 7); // RX, TX

void setup()  
{
  Serial.begin(38400);
  bluetooth.begin(38400);
  pinMode(LED, OUTPUT);
  pinMode(LED_1, OUTPUT);
}

void loop()
{
  digitalWrite(LED_1, HIGH);
  char letra;
  if (bluetooth.available()){
    letra = bluetooth.read();
    if (letra == 'A'){
      digitalWrite(LED, HIGH);
    }
    if (letra == 'a'){
      digitalWrite(LED, LOW);
    }  
  }
}

PS.: I’m using BT Shield IteadStudio V2.2