How to send text from phone to arduino using HC-05 and then display it on OLED

I am working on smart eye glass project, but I am new to arduino and don’t know much about the interfaces.
I have created an app using MIT app inventor to send text from phone to arduino and display it on an I2C oled display. I just want the basic code to accept text from my app in arduino and display it on serial monitor for the time being. I will then display it on an oled display later. Any type of help will be highly appreciated.

I don’t know about phone programming or OLEDs but the examples in Serial Input Basics illustrate simple reliable ways to receive data.

…R

Thanks. So after referring some codes I have finally managed to write this code:

#include<SoftwareSerial.h>

SoftwareSerial BTSerial(0,1);
void setup()
{
Serial.begin(9600);
BTSerial.begin(9600);

}

void loop()
{
while (BTSerial.available())
{
delay(10);
char inputString = {BTSerial.read()};
Serial.write(inputString);
}
}

Can this communicate with HC-05?

darrlpz:
Can this communicate with HC-05?

Have you tried it? If so, what happened?

The Arduino system is great for learning by doing.

And that is not how I would do it - but I presume you have decided not to use the code in my examples.

…R

No, actually arduino is not with me at present. So did not try the code, I was just asking in general. I will try it tomorrow and will post results here.