HC-06 Bluetooth + Android - HELP!!!

Hi. I’ve an Arduino UNO + HC-06 Bluetooth Module + App Inventor App. I can turn on and off a LED with the app, but when i try to send any data from Arduino to Android the app freeze. Has anyone ever experienced this? I think is some trouble with communication between Arduino and Android.

Module Link

#include <SoftwareSerial.h>
int pinGas = 2;
byte Valor_Gas = 0;
int bluetoothTx = 3;
int bluetoothRx = 2;
int serialB;

SoftwareSerial blue(bluetoothRx, bluetoothTx);

void setup()

void loop()

  if (blue.available() > 0) {
  serialB = (int)blue.read();
  if (serialB == 9){
  Valor_Gas = analogRead(pinGas);
  serialB = 0;


Can you receive data sent from the Arduino on the phone? To make sure the issue is not in the App inventor code, you should use a terminal emulator (like BlueTerm) on the phone for testing. Another possible issue is that some of these BlueTooth modules work well with 3.3v only on the tx and rx lines (even though you can power the module from the 5v pin of the Arduino). You should post your circuit as well.