Receiving data from arduino to android app inventor

Hey, I want to receive some data from my arduino (via bluetooth module hc06) to an app that i created on mit app inventor but i couldn’t get it done. Here is my arduino code and the blocks of that app.

const int trigpin = 12;
const int echopin = 11;

int sure;
int mesafe;

void setup() {
  
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, INPUT);
  Serial.begin(9600);
}

void loop() {

  digitalWrite(trigpin, HIGH);
  delay(1);
  digitalWrite(trigpin, LOW);

  sure = pulseIn(echopin, HIGH);
  mesafe = (sure/2) / 29.1;


  if (mesafe > 0 && mesafe < 100) {
  Serial.write("Coming");
  delay(1000);
  }

  else if (mesafe > 100 && mesafe < 400) {
    Serial.write("Not Coming");
    delay(1000);
    }
}

Where is the problem?

Does the HC06 being slave only make a difference?

I was able to work this a month ago but when I tried again today it didn't work. I'm wondering if my bluetooth module is broken because I don't use logic converter. I connected its vcc pin directly to 5v on arduino.

OZtolu:
I was able to work this a month ago but when I tried again today it didn't work. I'm wondering if my bluetooth module is broken because I don't use logic converter. I connected its vcc pin directly to 5v on arduino.

Possibly. Some people seem to be getting away with using 5v on the data pins, others aren't. To test the module make a basic connection to the Android device using one of the terminal apps. Something like the example here.

I did some testing and yeah, my bt module is broken. I'm going to get a new one and use it with logic converter I guess. Thank you all for your help.