Here is my test code for a HC05 Bluetooth module and the Bluetooth serial terminal. Adjust the pins as necessary for your setup. Use this simple code to make sure the Bluetooth module is connected and working.
//Sends from serial monitor to the Bluetooth device app
// receives from the Bluetooth device app
SoftwareSerial BTserial(4, 7); // pin 4 to BT TX, pin 7 to BT RX
// through voltage divider
Serial.println("Bluetooth test program");
BTserial.println("Bluetooth test program");
bluetooth.available() ; //Espera un carácter
char rxChar = bluetooth.read(); //Lee carácter y lo borra del buffer
You are not doing serial input correctly. Your bluetooth.available() is doing nothing. I would suggest that you have a look at the serial input basics tutorial to see how to use the avaiable() function and how to receive serial data. Example 1 - Receiving single characters does just what you need.
Calls for help like this one are becoming more frequent. Someone builds a phone/Arduino project based on a tutorial or kit. It doesn't work and they come to the Arduino or MIT AI forum asking "what's wrong?".
All the elements to make such a project work are well described in many places.
The discussion we are in right now encompasses pretty well all the key points in troubleshooting an app/Arduino problem.
I would like to suggest that anyone wanting to know why their MIT App Inventor app isn't working correctly with their Arduino kit are referred to this discussion. They should only call for help after they have checked off everything in this discussion and still can't get things right.
What do others think about that? Do you not get tired of asking the same questions, making the same suggestions?
Sounds like a good suggestion. But it´s not that easy to find this exact topic when looking for it in Google.
Maybe it should be better if someone try to do a specific topic that everybody references, just as what has been doing with this "Serial Imput Basics" that @groundFungus mentioned. I´ve seen many many references to this topic everytime that someone asks about dealing with received messages or exchanging information through Serial Monitor.