Seeking Code for HC-05 & MIT App inventor For ploting a graph of an analogus sensor of the arduino uno for the below IDE code?

int analogPin = A3;
int Rawval ; // variable to store the value read
int Scaleval ;
int RELAY_pin = 10; // Relay is connected to pin D10
void setup()
{
Serial.begin(9600); // setup serial
pinMode(RELAY_pin, OUTPUT);
}

void loop()
{
int Rawval = analogRead(analogPin);
Serial.print("Rawvalue from Analog input =");
Serial.print(Rawval);
Scaleval = map(Rawval, 0, 675, 0, 20);
Serial.print(" Scaled Value =");
Serial.println(Scaleval);

if ( Rawval < 169) digitalWrite(RELAY_pin, HIGH);
else digitalWrite(RELAY_pin, LOW);
}

Hello Piku

Search the forum for HC-05 (and HC-05) - you will find plenty of examples.

Concerning your Sketch, you will need to control the time interval of the loop.

Example:

//ArduinoToApp.ino  02/03/2021 02:38:48

//Fake data stream to demo elapased milliseconds timing


//vars
unsigned long lgUpdateTime;

void setup()
{
               Serial.begin(9600);
               lgUpdateTime = millis();
}

void loop()
{
	           if(millis() - lgUpdateTime > 1000)           //Loop approx every 1 second
               {
                         lgUpdateTime = millis();

                         //Bluetooth to App
                         Serial.print("Hello");
                         Serial.print("|");      //Value delimiter
                         Serial.print("World");
                         Serial.print("|");
                         Serial.println();        //This empty last line tells App "End of Data" = Ascii LineFeed Char Number 10
               }
}

Consider using JSON or YAML for the message format.

They are super simple to parse in AI2 and quite readable.

Use short names to save air time.